vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Problem when opening a devcontainer on Ubuntu 20.04

Open andreriesco opened this issue 2 years ago • 12 comments

  • VSCode Version: 1.68.0
  • Local OS Version: Ubuntu 20.04 LTS
  • Remote OS Version: Ubuntu 20.04 LTS
  • Remote Extension/Connection Type: Containers
  • Remote - Containers: 0.238.2
  • Logs:
[158 ms] Remote-Containers 0.238.2 in VS Code 1.68.0 (4af164ea3a06f701fe3e89a2bcbb421d2026b68f).
[157 ms] Start: Resolving Remote
[235 ms] Setting up container for folder or workspace: /home/andreriesco/Documents/IDEExtension/test-applications/testqt
[244 ms] Start: Check Docker is running
[245 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[333 ms] Server API version: 1.42
[336 ms] Start: Run: docker volume ls -q
[439 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/andreriesco/Documents/IDEExtension/test-applications/testqt --filter label=vsch.quality=stable
[527 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/andreriesco/Documents/IDEExtension/test-applications/testqt
[612 ms] Start: Run: /snap/code/98/usr/share/code/code /home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/andreriesco/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/andreriesco/Documents/IDEExtension/test-applications/testqt --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/andreriesco/Documents/IDEExtension/test-applications/testqt --log-level debug --log-format json --config /home/andreriesco/Documents/IDEExtension/test-applications/testqt/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[840 ms] remote-containers 0.238.2.
[840 ms] Start: Run: docker buildx version
[985 ms] Start: Resolving Remote
[990 ms] Start: Run: git rev-parse --show-cdup
[1000 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/andreriesco/Documents/IDEExtension/test-applications/testqt
[1083 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /home/andreriesco/Documents/IDEExtension/test-applications/testqt/.devcontainer/Dockerfile -t vsc-testqt-4a36f7b04b155e6106a2d9e2b756e526 /home/andreriesco/Documents/IDEExtension/test-applications/testqt/.devcontainer
[+] Building 0.1s (5/6)                                                         
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 872B                                       0.0s
 => [internal] load metadata for docker.io/library/testqt_arm32v7-qt5-way  0.0s
 => [1/2] FROM docker.io/library/testqt_arm32v7-qt5-wayland-no-ssh_bullse  0.0s
 => CACHED [2/2] RUN addgroup docker && groupmod --non-unique --gid 135 d  0.0s
 => preparing layers for inline cache                                      0.1s
error: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
[1424 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /home/andreriesco/Documents/IDEExtension/test-applications/testqt/.devcontainer/Dockerfile -t vsc-testqt-4a36f7b04b155e6106a2d9e2b756e526 /home/andreriesco/Documents/IDEExtension/test-applications/testqt/.devcontainer
[1425 ms]     at jR (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:240:1143)
[1425 ms]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[1425 ms]     at async Uu (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:239:2142)
[1426 ms]     at async Jy (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:239:1168)
[1426 ms]     at async zR (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:2006)
[1426 ms]     at async nb (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:3110)
[1427 ms]     at async JR (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:13046)
[1427 ms]     at async KR (/home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:12802)
[1435 ms] Exit code 1
[1445 ms] Command failed: /snap/code/98/usr/share/code/code /home/andreriesco/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/andreriesco/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/andreriesco/Documents/IDEExtension/test-applications/testqt --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/andreriesco/Documents/IDEExtension/test-applications/testqt --log-level debug --log-format json --config /home/andreriesco/Documents/IDEExtension/test-applications/testqt/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[1446 ms] Exit code 1

Steps to Reproduce:

  1. Try to open a project that contains a .devcontainer.json file on Visual Studio Code

Downgrading the Remote - Containers extension to v0.234.0 fixes the problem

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No

andreriesco avatar Jun 10 '22 18:06 andreriesco

same issue

zoosewu avatar Jun 12 '22 11:06 zoosewu

What do you get for docker version and docker buildx version?

chrmarti avatar Jun 13 '22 15:06 chrmarti

Also having this issue. For me:

docker version
Client: Docker Engine - Community
 Version:           22.06.0-beta.0
 API version:       1.42
 Go version:        go1.18.3
 Git commit:        3e9117b
 Built:             Fri Jun  3 18:00:23 2022
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          22.06.0-beta.0
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.18.3
  Git commit:       38633e7
  Built:            Fri Jun  3 17:58:13 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker buildx version
github.com/docker/buildx v0.8.2 %{_buildx_gitcommit}

qbloomfield avatar Jun 13 '22 19:06 qbloomfield

Could you append your devcontainer.json and Dockerfile? Also: If you have a non-beta install of Docker available, could you check if it works there?

chrmarti avatar Jun 13 '22 19:06 chrmarti

Same issue, here are the versions:

docker version
Client: Docker Engine - Community
 Version:           20.10.16
 API version:       1.41
 Go version:        go1.17.10
 Git commit:        aa7e414
 Built:             Thu May 12 09:17:23 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.16
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.10
  Git commit:       f756502
  Built:            Thu May 12 09:15:28 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.4
  GitCommit:        212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.1-0-g52de29d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker buildx version
github.com/docker/buildx v0.3.0 c967f1d570fb393b4475c01efea58781608d093c

p.s. I'm on Ubuntu 22.04 LTS, that is different from the OS reported by the OP.

leograba avatar Jun 14 '22 14:06 leograba

Could you append your devcontainer.json and Dockerfile? @leograba @zoosewu Could you also include your log? (F1 > Remote-Containers: Show Container Log)

chrmarti avatar Jun 15 '22 07:06 chrmarti

devcontainer.json:

{
    "name": "torizon_testqt",
    "dockerFile": "Dockerfile",
    "extensions": [
        "ms-vscode.cpptools",
        "Toradex.torizon-early-access"
    ],
    "containerEnv": {
        "AR": "arm-linux-gnueabihf-ar",
        "AS": "arm-linux-gnueabihf-as",
        "CC": "arm-linux-gnueabihf-gcc",
        "CXX": "arm-linux-gnueabihf-g++",
        "CPP": "arm-linux-gnueabihf-cpp",
        "STRIP": "arm-linux-gnueabihf-strip",
        "LD": "arm-linux-gnueabihf-ld",
        "CROSS_COMPILE": "arm-linux-gnueabihf-",
        "QMAKE": "arm-linux-gnueabihf-qmake",
        "QT_INCLUDES": "/usr/include/arm-linux-gnueabihf/qt5"
    },
    "runArgs": [
        "--network=host"
    ],
    "remoteUser": "torizon",
    "mounts": [
        "source=${localEnv:HOME}${localEnv:USERPROFILE}/.moses,target=/home/torizon/.moses,type=bind",
        "source=//var/run/docker.sock,target=/var/run/docker.sock,type=bind"
    ],
    "postCreateCommand": "true"
}

Dockerfile (first one, that generates the image used on the FROM of the second one):

FROM torizon/debian-cross-toolchain-armhf:2-bullseye

RUN HOLD_PKGS='libdrm-common libdrm-amdgpu1:armhf libdrm2:armhf' \
    && apt-get -y update \
    && apt-get -y upgrade \
    && for P in $HOLD_PKGS ; do \
    echo ${P}=$(apt-cache show $P | sed -r -e '/^Version:/!d' -e 's/.* //' -e '/toradex/d' -e 'q') ; \
    done | xargs -r apt-get install -y --no-install-recommends \
    && apt-mark hold $HOLD_PKGS \
    && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*

# commands that should be run before installing packages (ex: to add a feed or keys)


# your regular RUN statements here
# Install required packages
RUN apt-get -q -y update \
    && apt-get -q -y install \
    python3-minimal \
    gdb-multiarch \
    procps \
    rsync \
    openssh-client \
    qt5-qmake:armhf \
    qtbase5-dev:armhf \
    && rm -rf /var/lib/apt/lists/*

RUN if [ ! -z "qtdeclarative5-dev:armhf libegl-dev:armhf libgl-dev:armhf" ]; then \
    apt-get -q -y update \
    && apt-get -q -y install qtdeclarative5-dev:armhf libegl-dev:armhf libgl-dev:armhf \
    && rm -rf /var/lib/apt/lists/* ; \
    fi

RUN if [ ! -z "" ]; then \
    apt-get -q -y update \
    && apt-get -q -y install  \
    && rm -rf /var/lib/apt/lists/* ; \
    fi

# add qt pretty printer
RUN mkdir -p /home/torizon/.gdb/qt5printers/ && \
    cd /home/torizon/.gdb/qt5printers && \
echo 'python \n\
import sys, os.path \n\
sys.path.insert(0, os.path.expanduser("~/.gdb")) \n\
import qt5printers \n\
qt5printers.register_printers(gdb.current_objfile()) \n\
end' > /home/torizon/.gdbinit

ADD sdkfiles /home/torizon/.gdb/qt5printers/

Dockerfile (second one):

FROM testqt_arm32v7-qt5-wayland-no-ssh_bullseye_release_abb31ba6-da93-4470-be15-8c9274fe10f8_sdk_image

# This is required to allow regular user inside the container to access docker socket
RUN addgroup docker && groupmod --non-unique --gid 135 docker && adduser torizon docker

docker version:

Client: Docker Engine - Community
 Version:           22.06.0-beta.0
 API version:       1.42
 Go version:        go1.18.3
 Git commit:        3e9117b
 Built:             Fri Jun  3 17:55:45 2022
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          22.06.0-beta.0
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.18.3
  Git commit:       38633e7
  Built:            Fri Jun  3 17:55:45 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker buildx version:

github.com/docker/buildx v0.8.2 

andreriesco avatar Jun 15 '22 12:06 andreriesco

@andreriesco Could you try with a non-beta version of Docker?

chrmarti avatar Jun 17 '22 08:06 chrmarti

I was seeing a similar issue with these settings: VSCode Version: 1.67.2 Local OS Version: Ubuntu 20.04 LTS Remote OS Version: Ubuntu 20.04 LTS Remote Extension/Connection Type: Containers Remote - Containers: 0.238.2 Logs:

[2022-06-17T20:39:18.158Z] Remote-Containers 0.238.2 in VS Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5).
[2022-06-17T20:39:18.158Z] Start: Resolving Remote
[2022-06-17T20:39:18.163Z] Setting up container for folder or workspace: /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-17T20:39:18.165Z] Start: Check Docker is running
[2022-06-17T20:39:18.166Z] Start: Run: docker version --format {{.Server.APIVersion}}
[2022-06-17T20:39:18.189Z] Stop (23 ms): Run: docker version --format {{.Server.APIVersion}}
[2022-06-17T20:39:18.189Z] Server API version: 1.41
[2022-06-17T20:39:18.189Z] Stop (24 ms): Check Docker is running
[2022-06-17T20:39:18.190Z] Start: Run: docker volume ls -q
[2022-06-17T20:39:18.208Z] Stop (18 ms): Run: docker volume ls -q
[2022-06-17T20:39:18.212Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --filter label=vsch.quality=stable
[2022-06-17T20:39:18.230Z] Stop (18 ms): Run: docker ps -q -a --filter label=vsch.local.folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --filter label=vsch.quality=stable
[2022-06-17T20:39:18.230Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-17T20:39:18.248Z] Stop (18 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-17T20:39:18.248Z] Start: Run: /usr/share/code/code /home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/finickyDrone/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --log-level debug --log-format json --config /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-06-17T20:39:18.348Z] remote-containers 0.238.2.
[2022-06-17T20:39:18.348Z] Start: Run: docker buildx version
[2022-06-17T20:39:18.392Z] Stop (44 ms): Run: docker buildx version
[2022-06-17T20:39:18.393Z] Start: Resolving Remote
[2022-06-17T20:39:18.394Z] Start: Run: git rev-parse --show-cdup
[2022-06-17T20:39:18.397Z] Stop (3 ms): Run: git rev-parse --show-cdup
[2022-06-17T20:39:18.397Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-17T20:39:18.414Z] Stop (17 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-17T20:39:18.416Z] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/Dockerfile -t vsc-rokus-b671125b954df32b426c4998a0846987 /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer
[2022-06-17T20:39:18.586Z] [+] Building 0.0s (0/1)                                                         
[2022-06-17T20:39:18.737Z] [+] Building 0.2s (2/3)                                                         
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 32B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/rokus/flir_dev:latest_aarch64   0.1s
[2022-06-17T20:39:18.887Z] [+] Building 0.3s (2/3)                                                         
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 32B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/rokus/flir_dev:latest_aarch64   0.3s
[2022-06-17T20:39:18.954Z] [+] Building 0.4s (3/3) FINISHED                                                
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 32B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => ERROR [internal] load metadata for docker.io/rokus/flir_dev:latest_aa  0.3s
------
 > [internal] load metadata for docker.io/rokus/flir_dev:latest_aarch64:
[2022-06-17T20:39:18.954Z] ------
error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
[2022-06-17T20:39:18.958Z] Stop (542 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/Dockerfile -t vsc-rokus-b671125b954df32b426c4998a0846987 /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer
[2022-06-17T20:39:18.959Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/Dockerfile -t vsc-rokus-b671125b954df32b426c4998a0846987 /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer
[2022-06-17T20:39:18.959Z]     at jR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:240:1143)
[2022-06-17T20:39:18.959Z]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-06-17T20:39:18.959Z]     at async Uu (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:239:2142)
[2022-06-17T20:39:18.959Z]     at async Jy (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:239:1168)
[2022-06-17T20:39:18.959Z]     at async zR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:2006)
[2022-06-17T20:39:18.959Z]     at async nb (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:3110)
[2022-06-17T20:39:18.959Z]     at async JR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:13046)
[2022-06-17T20:39:18.959Z]     at async KR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:12802)
[2022-06-17T20:39:18.962Z] Stop (714 ms): Run: /usr/share/code/code /home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/finickyDrone/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --log-level debug --log-format json --config /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-06-17T20:39:18.962Z] Exit code 1
[2022-06-17T20:39:18.965Z] Command failed: /usr/share/code/code /home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/finickyDrone/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --log-level debug --log-format json --config /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-06-17T20:39:18.965Z] Exit code 1

I then decided to upgrade to VSCode 168.1, then I saw a different error Logs:

[2022-06-20T13:32:51.063Z] Remote-Containers 0.238.2 in VS Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630).
[2022-06-20T13:32:51.063Z] Start: Resolving Remote
[2022-06-20T13:32:51.067Z] Setting up container for folder or workspace: /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-20T13:32:51.069Z] Start: Check Docker is running
[2022-06-20T13:32:51.069Z] Start: Run: docker version --format {{.Server.APIVersion}}
[2022-06-20T13:32:51.092Z] Stop (23 ms): Run: docker version --format {{.Server.APIVersion}}
[2022-06-20T13:32:51.093Z] Server API version: 1.41
[2022-06-20T13:32:51.093Z] Stop (24 ms): Check Docker is running
[2022-06-20T13:32:51.093Z] Start: Run: docker volume ls -q
[2022-06-20T13:32:51.111Z] Stop (18 ms): Run: docker volume ls -q
[2022-06-20T13:32:51.114Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --filter label=vsch.quality=stable
[2022-06-20T13:32:51.131Z] Stop (17 ms): Run: docker ps -q -a --filter label=vsch.local.folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --filter label=vsch.quality=stable
[2022-06-20T13:32:51.132Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-20T13:32:51.150Z] Stop (18 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-20T13:32:51.150Z] Start: Run: docker inspect --type container 3bd774d820e8
[2022-06-20T13:32:51.168Z] Stop (18 ms): Run: docker inspect --type container 3bd774d820e8
[2022-06-20T13:32:51.169Z] Start: Run: /usr/share/code/code /home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/finickyDrone/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --log-level debug --log-format json --config /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-06-20T13:32:51.265Z] remote-containers 0.238.2.
[2022-06-20T13:32:51.265Z] Start: Run: docker buildx version
[2022-06-20T13:32:51.311Z] Stop (46 ms): Run: docker buildx version
[2022-06-20T13:32:51.311Z] Start: Resolving Remote
[2022-06-20T13:32:51.313Z] Start: Run: git rev-parse --show-cdup
[2022-06-20T13:32:51.315Z] Stop (2 ms): Run: git rev-parse --show-cdup
[2022-06-20T13:32:51.316Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-20T13:32:51.333Z] Stop (17 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus
[2022-06-20T13:32:51.333Z] Start: Run: docker inspect --type container 3bd774d820e8
[2022-06-20T13:32:51.351Z] Stop (18 ms): Run: docker inspect --type container 3bd774d820e8
[2022-06-20T13:32:51.351Z] Start: Starting container
[2022-06-20T13:32:51.352Z] Start: Run: docker start 3bd774d820e85aa33035686e7674290646544892d4a33728f772bea0aa6aaa26
[2022-06-20T13:32:51.381Z] Stop (29 ms): Run: docker start 3bd774d820e85aa33035686e7674290646544892d4a33728f772bea0aa6aaa26
[2022-06-20T13:32:51.382Z] Error: Command failed: docker start 3bd774d820e85aa33035686e7674290646544892d4a33728f772bea0aa6aaa26
[2022-06-20T13:32:51.382Z]     at NR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:239:1572)
[2022-06-20T13:32:51.382Z]     at Jy (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:239:1510)
[2022-06-20T13:32:51.382Z]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-06-20T13:32:51.382Z]     at async zR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:2006)
[2022-06-20T13:32:51.382Z]     at async nb (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:3110)
[2022-06-20T13:32:51.382Z]     at async JR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:13046)
[2022-06-20T13:32:51.382Z]     at async KR (/home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js:245:12802)
[2022-06-20T13:32:51.385Z] Stop (216 ms): Run: /usr/share/code/code /home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/finickyDrone/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --log-level debug --log-format json --config /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-06-20T13:32:51.385Z] Exit code 1
[2022-06-20T13:32:51.386Z] Command failed: /usr/share/code/code /home/finickyDrone/.vscode/extensions/ms-vscode-remote.remote-containers-0.238.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/finickyDrone/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus --log-level debug --log-format json --config /home/finickyDrone/Documents/LocalProjects/rokus/Software/rokus/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-06-20T13:32:51.387Z] Exit code 1

Downgrading back to v0.234.0 makes things work again, so I think v0.238.2 introduced an error.

finickyDrone avatar Jun 20 '22 14:06 finickyDrone

Hello @chrmarti, Changing the docker version to this stable version fixed the problem for me

Client: Docker Engine - Community
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:02:57 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:03 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

andreriesco avatar Jun 20 '22 15:06 andreriesco

switching docker to 20.10.17 did nothing here for me, only downgrading "Remote - Containers" extension to v0.234.0 "fixed" the problem

Edit: Vscode 1.71.0

Zincr0 avatar Sep 07 '22 17:09 Zincr0

Also affected by this bug.

I run Docker remotely, and create my dev containers with the command pallet, Remote-Containers: Clone repository in container volume. I saw similar error messages as finickyDrone when doing so.

Downgrading the Remote - Containers extension to v0.234.0 resolved the issue for me, as suggested by Zincr0.

Tielem avatar Sep 19 '22 20:09 Tielem

Maybe related: https://github.com/moby/moby/pull/42951

chrmarti avatar Sep 28 '22 07:09 chrmarti

What do you get for docker buildx ls? (Could be you are using a builder that is isolated from the local image cache.)

chrmarti avatar Sep 29 '22 07:09 chrmarti

I was able to solve my case.

I saw that the project folder was created with %20 due to git colone. I created a new folder called project and git cloned it. I copied the .devcontainer folder to project and it worked here.

I was left with the folder structure like this: image

docker: 20.10.17 vscode: 1.72.2 dev container extension: 234.0 operating system: Microsoft Windows 10 Enterprise version OS: 10.0.19044 N/A build 19044 wsl version: 2 WSL operating system: Ubuntu 20.04 LTS

Didjacome avatar Oct 22 '22 17:10 Didjacome

Somehow it this problem happened on me after install lastest vscode and dev container extenstion. After some guessing, I solved the problem by disable BUILDKIT_INLINE_CACHE in docker buildx I don't really known what this argument can do, but it fix problem.

"build": {
    "context": "./path/to/context",
    "dockerfile": "./path/to/dockerfile",
    "args": {
        "BUILDKIT_INLINE_CACHE": "0"
    }
}

docker: 23.0.0, build e92dd87 buildx version: github.com/docker/buildx v0.10.2 00ed17d vscode: 1.75.0 dev container extension: 0.275.0 operating system: Ubuntu 22.04.1 LTS x86_64 kernal: 5.15.0-58-generic

waynejhou avatar Feb 03 '23 03:02 waynejhou

Somehow it this problem happened on me after install lastest vscode and dev container extenstion. After some guessing, I solved the problem by disable BUILDKIT_INLINE_CACHE in docker buildx I don't really known what this argument can do, but it fix problem.

Same problem here, with exactly the same versions of docker, buildx, vscode, extension and OS with kernel :) But in my case it's even worse: I'm using a docker-compose based build environment, and vscode always adds a docker-compose.devcontainer.build-[build-id].yml file with overrides, where it says the following::

version: "3.8"

services:
  app:
    build:
      dockerfile: /tmp/devcontainercli-mike/container-features/0.29.0-1675421070034/Dockerfile-with-features
      args:
        - BUILDKIT_INLINE_CACHE=1
        - _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label

I have tried to comment BUILDKIT_INLINE_CACHE string, then I can build image manually, but the problem is vscode always rewrites it during startup, and I have no idea how to disable BUILDKIT_INLINE_CACHE with docker-compose based devcontainer :(

mlesin avatar Feb 03 '23 11:02 mlesin

Same problem here. Downgrading did help

eiswind avatar Feb 03 '23 15:02 eiswind

For docker-compose based devcontainer, a workarround is disable docker buildkit before open vscode. Example: DOCKER_BUILDKIT=0 code .

tobiasrdm avatar Feb 03 '23 17:02 tobiasrdm

A workarround is disable docker buildkit before open vscode. Example: DOCKER_BUILDKIT=0 code .

You can also put this in your devcontainer.json,


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

Fixes the issue, although not 100% sure what it actually does

mrjackwills avatar Feb 03 '23 18:02 mrjackwills

A workarround is disable docker buildkit before open vscode. Example: DOCKER_BUILDKIT=0 code .

You can also put this in your devcontainer.json,

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

Fixes the issue, although not 100% sure what it actually does

Same thing here, adding "BUILDKIT_INLINE_CACHE": "0" seems to fix the issue.

Note: in my case, when the error happened, Docker killed also other containers that were running on my system (not very good :sweat:)... maybe a Docker bug?

System info (os: Ubuntu 20.04.5 LTS):

$ docker version
Client: Docker Engine - Community
 Version:           23.0.0
 API version:       1.42
 Go version:        go1.19.5
 Git commit:        e92dd87
 Built:             Wed Feb  1 17:49:08 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          23.0.0
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       d7573ab
  Built:            Wed Feb  1 17:49:08 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.16
  GitCommit:        31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
$ docker buildx version
github.com/docker/buildx v0.10.2 00ed17d

darioleanbit avatar Feb 06 '23 09:02 darioleanbit

Note: in my case, when the error happened, Docker killed also other containers that were running on my system (not very good 😓)... maybe a Docker bug?

@darioleanbit Yes. The underlying error is caused by Docker. The buildx plugin added in Docker v23 is causing problems. I got to the PR moby/moby#44920 that fixes the problem from this comment.

tt4g avatar Feb 06 '23 10:02 tt4g

This should be fixed in Docker v23.0.1. (https://github.com/microsoft/vscode-remote-release/issues/7958#issuecomment-1425585936) Closing, let me know if you still see this with that version of Docker.

chrmarti avatar Mar 02 '23 08:03 chrmarti