-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Cannot build with DOCKER_BUILDKIT=0
#6853
Comments
you currently have the beta containerd integration turned on. does turning it off fix the issue? |
Yes, I can confirm that turning off containerd fixes the issue. |
@Niek note that in the next version of Docker Desktop the classic builder should work with containerd, we would love it if you would give it a try once it’s out |
@Niek 👋 out of curiosity; is there specific reason you need to use the classic builder? I know the plan is to sunset the classic builder at some point, so interested to learn what the main reason is for using it. |
@rumpl Definitely interested in testing if the next version fixes this. @thaJeztah That's a long story... It originates from this issue: httptoolkit/httptoolkit#423 |
@Niek thanks for the extra info; I personally hadn't heard of that issue before (but I'm also not on the team maintaining BuildKit 😅) Let me /cc @tonistiigi @crazy-max in case they're interested |
@rumpl @thaJeztah The above suggests this is resolved, but I've updated to the latest version (4.21.1) and it still fails when building the example here with the containerd beta enabled. The error has now changed though, so the above repro now prints: > DOCKER_BUILDKIT=0 docker build .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0
environment-variable.
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM scratch
--->
Step 2/2 : ENTRYPOINT ["fail"]
invalid reference format That's as opposed to the The exact same build works fine with the containerd beta disabled. Any ideas? |
Oh, and just for context: I maintain the software used by @Niek which integrates with Docker, and currently doesn't work with the containerd beta enabled due to this issue. The main reason I'm using the classic builder in that integration is because BuildKit isn't supported by Dockerode (see apocas/dockerode#601, which blames docker/for-linux#1136 for this) so I can't use BuildKit even if I want to. That won't be unique to me though - it's a very widely used package for Docker integration. |
Ah, I guess there's an issue with special-casing Here's witch echo -e 'FROM scratch\nENTRYPOINT ["fail"]' | DOCKER_BUILDKIT=0 docker build -
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM scratch
--->
Step 2/2 : ENTRYPOINT ["fail"]
invalid reference format And here's echo -e 'FROM alpine\nENTRYPOINT ["fail"]' | DOCKER_BUILDKIT=0 docker build -
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM alpine
7144f7bab3d4: Already exists
b312e4b0e2c6: Download complete
f6648c04cd6c: Download complete
---> 7144f7bab3d4
Step 2/2 : ENTRYPOINT ["fail"]
---> Running in d40d15a0a60c
Removing intermediate container d40d15a0a60c
---> b185bc886f29
Successfully built b185bc886f29 |
I opened a tracking ticket in the Moby repository; |
Ah, that makes sense. Perfect, thanks! |
I just updated In the docs it says If there isn't an easy workaround (like keeping a EDIT: OK, think there's some regression around |
34762F73-A587-449C-9D39-39DCCE54882E/20230524163419
Expected behavior
It should be possible to build a simple Dockerfile with
DOCKER_BUILDKIT=0
Actual behavior
Docker fails with
Error response from daemon: Bad response from Docker engine
Information
Output of
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
Steps to reproduce the behavior
The following info is in the log file
~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log
with debug logging enabled:The text was updated successfully, but these errors were encountered: