[Container] Fail to build a devcontainer: ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
-
VSCode Version: 1.75
-
Local OS Version: Fedora 37
-
Remote OS Version: Fedora 37
-
Remote Extension/Connection Type: Containers
-
Logs:
[2023-02-03T08:26:11.196Z] Dev Containers 0.276.0 in VS Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164).
[2023-02-03T08:26:11.196Z] Start: Resolving Remote
[2023-02-03T08:26:11.217Z] Setting up container for folder or workspace: /home/foo/bar
[2023-02-03T08:26:11.222Z] Start: Check Docker is running
[2023-02-03T08:26:11.223Z] Start: Run: docker version --format {{.Server.APIVersion}}
[2023-02-03T08:26:11.280Z] Stop (57 ms): Run: docker version --format {{.Server.APIVersion}}
[2023-02-03T08:26:11.281Z] Server API version: 1.42
[2023-02-03T08:26:11.281Z] Stop (59 ms): Check Docker is running
[2023-02-03T08:26:11.282Z] Start: Run: docker volume ls -q
[2023-02-03T08:26:11.332Z] Stop (50 ms): Run: docker volume ls -q
[2023-02-03T08:26:11.333Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/foo/bar --filter label=vsch.quality=stable
[2023-02-03T08:26:11.386Z] Stop (53 ms): Run: docker ps -q -a --filter label=vsch.local.folder=/home/foo/bar --filter label=vsch.quality=stable
[2023-02-03T08:26:11.386Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar --filter label=devcontainer.config_file=/home/foo/bar/.devcontainer/devcontainer.json
[2023-02-03T08:26:11.436Z] Stop (50 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar --filter label=devcontainer.config_file=/home/foo/bar/.devcontainer/devcontainer.json
[2023-02-03T08:26:11.437Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar
[2023-02-03T08:26:11.487Z] Stop (50 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar
[2023-02-03T08:26:11.488Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar
[2023-02-03T08:26:11.537Z] Stop (49 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar
[2023-02-03T08:26:11.538Z] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/foo/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder tmp/devcontainers-62a0e236-7d04-4ae3-9796-8b1ec8d2c4a91675412770316 --workspace-folder /home/foo/bar --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/foo/bar --id-label devcontainer.config_file=/home/foo/bar/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/foo/bar/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=/run/user/1000/wayland-0,target=/tmp/vscode-wayland-352c4678588e167720eb909b8010065c301da55a.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-02-03T08:26:11.791Z] (node:8185) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[2023-02-03T08:26:11.791Z] (Use `code --trace-deprecation ...` to show where the warning was created)
[2023-02-03T08:26:11.792Z] @devcontainers/cli 0.29.0. Node.js v16.14.2. linux 6.1.8-200.fc37.x86_64 x64.
[2023-02-03T08:26:11.792Z] Start: Run: docker buildx version
[2023-02-03T08:26:11.870Z] Stop (78 ms): Run: docker buildx version
[2023-02-03T08:26:11.871Z] github.com/docker/buildx v0.10.2 00ed17d
[2023-02-03T08:26:11.871Z]
[2023-02-03T08:26:11.871Z] Start: Resolving Remote
[2023-02-03T08:26:11.873Z] Start: Run: git rev-parse --show-cdup
[2023-02-03T08:26:11.878Z] Stop (5 ms): Run: git rev-parse --show-cdup
[2023-02-03T08:26:11.879Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar --filter label=devcontainer.config_file=/home/foo/bar/.devcontainer/devcontainer.json
[2023-02-03T08:26:11.928Z] Stop (49 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/foo/bar --filter label=devcontainer.config_file=/home/foo/bar/.devcontainer/devcontainer.json
[2023-02-03T08:26:11.931Z] Start: Run: docker inspect --type image fedora-base-image:latest
[2023-02-03T08:26:11.980Z] Stop (49 ms): Run: docker inspect --type image fedora-base-image:latest
[2023-02-03T08:26:11.981Z] local container features stored at: /home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/node_modules/vscode-dev-containers/container-features
[2023-02-03T08:26:11.982Z] Start: Run: tar --no-same-owner -x -f -
[2023-02-03T08:26:12.000Z] Stop (18 ms): Run: tar --no-same-owner -x -f -
[2023-02-03T08:26:12.002Z] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-foo/container-features/0.29.0-1675412771981/Dockerfile-with-features -t vsc-foo-d59d9b82524cc32346608bd4ab3ef08d --target dev_containers_target_stage --build-arg ADDITIONAL_PACKAGES= --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/foo/bar/.devcontainer
[2023-02-03T08:26:12.196Z]
[2023-02-03T08:26:12.196Z] [+] Building 0.0s (0/1)
[2023-02-03T08:26:12.335Z] [+] Building 0.1s (5/6)
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
[2023-02-03T08:26:12.335Z] => [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 1.37kB 0.0s
=> [internal] load metadata for docker.io/library/fedora-base-image 0.0s
=> [dev_container_auto_added_stage_label 1/2] FROM docker.io/library/fed 0.0s
=> CACHED [dev_container_auto_added_stage_label 2/2] RUN [[ ! -z "" ]] 0.0s
=> preparing layers for inline cache 0.1s
ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
[2023-02-03T08:26:12.540Z] Stop (538 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-foo/container-features/0.29.0-1675412771981/Dockerfile-with-features -t vsc-foo-d59d9b82524cc32346608bd4ab3ef08d --target dev_containers_target_stage --build-arg ADDITIONAL_PACKAGES= --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/foo/bar/.devcontainer
[2023-02-03T08:26:12.541Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-foo/container-features/0.29.0-1675412771981/Dockerfile-with-features -t vsc-foo-d59d9b82524cc32346608bd4ab3ef08d --target dev_containers_target_stage --build-arg ADDITIONAL_PACKAGES= --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/foo/bar/.devcontainer
[2023-02-03T08:26:12.542Z] at pie (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:1916:1698)
[2023-02-03T08:26:12.543Z] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-02-03T08:26:12.543Z] at async vF (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:1915:1972)
[2023-02-03T08:26:12.544Z] at async P7 (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:1915:901)
[2023-02-03T08:26:12.545Z] at async Fie (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:1921:2093)
[2023-02-03T08:26:12.545Z] at async Vf (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:1921:3241)
[2023-02-03T08:26:12.546Z] at async eoe (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:2045:17324)
[2023-02-03T08:26:12.546Z] at async Qse (/home/foo/.vscode/extensions/ms-vscode-remote.remote-containers-0.276.0/dist/spec-node/devContainersSpecCLI.js:2045:17065)
Steps to Reproduce:
- Trying to create a dev container
I don't know what is causing this issue, this morning I upgraded at the same time, VSCode to 1.75 and Docker to 23.0.0. I think one of them seems to have triggered this issue I didn't have yesterday.
Same here.
It seems to be the docker upgrade, see #7955
Same here, glad I'm not alone, it was driving me crazy.
I succeed to make it works by disabling all Dev Container Features in my .devcontainer.json configuration file. Do you have the same behavior?
I've tried to deactivate almost everything, but in my case the error still occurs.
Same here, the issue comes from the upgrade of Docker, thanks @pglira to point me out the closed issue.
Maybe the issue comes from the new default builder, I don't know:

As for now, I'll leave this issue opened, just to continue to investigate.
I found maybe a possible relating problem while digging into buildx issues: https://github.com/docker/buildx/issues/1325.
I downgraded docker to 20.10.23 and now it works again.
For this I followed the instructions here: https://docs.docker.com/engine/install/ubuntu/ (I'm on Ubuntu 22.04)

(However, it did not work immediately. For some reason I needed to reinstall also docker-desktop and to restart my pc twice but this might not be necessary in other cases.)
Tracking https://github.com/devcontainers/cli/issues/398.
Same here :smiling_face_with_tear:
same :(
same here (on my open source project: https://github.com/antonioconselheiro/bater-ponto)
Had the same problem, docker-compose build worked but vscode devcontainers builds are failing with the same issue. Downgrading to 20.10.23 fixed the problem
Workaround without changing docker version, if using linux is to add
export DOCKER_BUILDKIT=0
to your ~/.profile
Restart vscode and I was able to build the container again.
Plopping in a snippet of the error for search engines in case other people run into this:
=> preparing layers for inline cache 0.2s
ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
I hope there is a fix soon!
We got an answer in docker buildx project, a fix is in the pipe: https://github.com/docker/buildx/issues/1325#issuecomment-1416444770
Easy workaround until the fix is live is to disable inline cache in devcontainer.json :
"build": {
"dockerfile": "Dockerfile",
"cacheFrom": "brewblox/firmware-devcontainer:bullseye",
"args": {
"USERNAME": "vscode",
"BUILDKIT_INLINE_CACHE": "0"
}
},
@elcojacobs 's workaround worked for me
I also found out that the slowest part of a container rebuild here was pushing it to the inline cache, which somehow took 10 minutes. Just rebuilding from the registry cache finishes in 10 seconds, so I might leave the inline cache disabled. Not sure what the benefit would be if we keep a registry container up-to-date.
Plopping in a snippet of the error for search engines in case other people run into this:
=> preparing layers for inline cache 0.2s ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOFI hope there is a fix soon!
Doing the community a service. Thank you!
Same error here. After three hours of frustration I finally found this issue. I'm gonna downgrade Docker now to see if I'm lucky