← Winnitude! Search  ·  Reader Mode (719 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 9 LINKS

ERROR:Could not build image: Get "https://registry-1.docker.io/v2/": context deadline exceeded · Issue #2503 · docker-java/docker-java

Repository navigation

ERROR:Could not build image: Get "https://registry-1.docker.io/v2/": context deadline exceeded  #2503


New issue

New issue

Open

Open
ERROR:Could not build image: Get "https://registry-1.docker.io/v2/": context deadline exceeded #2503

Description

@zenghaiy's profile zenghaiy opened on Sep 15, 2025

ERROR:Could not build image: Get "https://registry-1.docker.io/v2/ ": context deadline exceeded

When using docker-java to create an image through the Dockerfile, it reports an error: Could not build image: Get "https://registry-1.docker.io/v2/ ": context deadline exceeded. However, when I use the docker command line to create the image based on the Dockerfile, there is no problem. What could be the reason?

Here are the detailed error messages:

com.github.dockerjava.api.exception.DockerClientException: Could not build image: Get "https://registry-1.docker.io/v2/ ": context deadline exceeded
at com.github.dockerjava.api.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:71)
at com.github.dockerjava.api.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:50)
at com.casit.skystart.task.DockerImageTaskHandler.buildImage(DockerImageTaskHandler.java:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:360)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:114)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions