Skip to content
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

Docker v23 on linux causes devcontainer dockerfile to fail with eof #398

Open
nickbabcock opened this issue Feb 3, 2023 · 3 comments
Open
Assignees
Labels
bug Something isn't working upstream Issue identified as 'upstream' component related (exists outside of Dev Containers CLI)

Comments

@nickbabcock
Copy link

I have a pretty simple setup

.devcontainer/devcontainer.json

{
  "build": {
    "dockerfile": "Dockerfile"
  }
}

.devcontainer/Dockerfile

FROM mcr.microsoft.com/devcontainers/base:debian

When I execute:

devcontainer build --workspace-folder .

It fails with:

[8 ms] @devcontainers/cli 0.29.0. Node.js v18.12.1. linux 5.15.0-58-generic x64.
[131 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-nick/container-features/0.29.0-1675436665362/Dockerfile-with-features -t vsc-pdx-tools-c6e30ed9b67aad39ca1d11866a63d38e --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/nick/projects/pdx-tools/.devcontainer
[+] Building 0.1s (4/5)                                                         
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load build definition from Dockerfile-with-features         0.1s
 => => transferring dockerfile: 433B                                       0.0s
 => [internal] load metadata for mcr.microsoft.com/devcontainers/base:deb  0.0s
 => CACHED [dev_container_auto_added_stage_label 1/1] FROM mcr.microsoft.  0.0s
 => preparing layers for inline cache                                      0.1s
ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-nick/container-features/0.29.0-1675436665362/Dockerfile-with-features -t vsc-pdx-tools-c6e30ed9b67aad39ca1d11866a63d38e --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/nick/projects/pdx-tools/.devcontainer
    at pie (/home/nick/.volta/tools/image/packages/@devcontainers/cli/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1916:1698)
    at async vF (/home/nick/.volta/tools/image/packages/@devcontainers/cli/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1915:1972)
    at async uoe (/home/nick/.volta/tools/image/packages/@devcontainers/cli/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2045:26894)
    at async aoe (/home/nick/.volta/tools/image/packages/@devcontainers/cli/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2045:25017)
{"outcome":"error","message":"Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-nick/container-features/0.29.0-1675436665362/Dockerfile-with-features -t vsc-pdx-tools-c6e30ed9b67aad39ca1d11866a63d38e --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/nick/projects/pdx-tools/.devcontainer","description":"An error occurred building the image."}

I'm assuming this has something to do with Docker v23 (released a couple days ago) making buildkit the default on linux.

I'm happy to provide more info about my environment if that'll help -- or if there is a better repo to report this issue.

@chrmarti
Copy link
Contributor

chrmarti commented Feb 3, 2023

I found maybe a possible relating problem while digging into buildx issues: docker/buildx#1325.

Originally posted by @jaudiger in microsoft/vscode-remote-release#7958 (comment)

@chrmarti chrmarti added the upstream Issue identified as 'upstream' component related (exists outside of Dev Containers CLI) label Feb 3, 2023
@mrjackwills
Copy link

mrjackwills commented Feb 3, 2023

I posted in another issue, microsoft/vscode-remote-release#6814 (comment), but have a temporary solution

update the devcontainer.json to

"build": {
    "dockerfile": "Dockerfile",
    "args": {
         "VARIANT": "bullseye",
	 "BUILDKIT_INLINE_CACHE": "0"
    }
},

@chrmarti
Copy link
Contributor

chrmarti commented Feb 6, 2023

We got an answer in docker buildx project, a fix is in the pipe: docker/buildx#1325 (comment)

Originally posted by @jaudiger in microsoft/vscode-remote-release#7958 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue identified as 'upstream' component related (exists outside of Dev Containers CLI)
Projects
None yet
Development

No branches or pull requests

3 participants