microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 290 forks source link

Containers: Build target ignored #7308

Closed max06 closed 1 year ago

max06 commented 2 years ago

Type: Bug

Devcontainer built from multistage dockerfile: First stage to be used by vscode, second stage for CI pipeline. Configuration file contains option build.target: dev. Option use to work, stopped working now.

Extension version: 0.255.2 VS Code version: Code 1.72.0 (64bbfbf67ada9953918d72e1df2f4d8e537d340e, 2022-10-04T23:20:39.912Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No Remote OS version: Linux x64 5.15.0-1020-azure

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 3950X 16-Core Processor (32 x 3493)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|63.92GB (25.43GB free)| |Process Argv|--crash-reporter-id 1b0144af-0aee-4e86-b715-64b756167f5e| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|Dev Container: Project @ remote_host| |OS|Linux x64 5.15.0-1020-azure| |CPUs|AMD Ryzen 9 3950X 16-Core Processor (32 x 3493)| |Memory (System)|16.69GB (11.75GB free)| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 2144e591:30553903 pyindex848cf:30577861 fc301958:30573243 ```
Shortened Dockerfile ```Dockerfile ARG VARIANT=3-bullseye # dockerfile_lint - ignore FROM --platform=amd64 mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} as dev LABEL name="DevContainer for Project" LABEL version="1.0.0" # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi # ... only necessary for startup # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g ora" 2>&1 # For profile persistence RUN mkdir /home/vscode/.vscode-server && chown vscode.vscode /home/vscode/.vscode-server # [Optional] Just for the CI pipeline FROM dev as ci # ... long running stuff ```
shortened devcontainer configuration ```jsonc "build": { "dockerfile": "Dockerfile", "context": "..", "args": { // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local on arm64/Apple Silicon. "VARIANT": "3.10-bullseye", // Options "NODE_VERSION": "lts/*" }, "target": "dev" }, ```
max06 commented 2 years ago

Side node: Your issue reporter is lying - there was no preview to edit, issue went public immediately. Bad if you want to remove sensitive details.

chrmarti commented 2 years ago

Issue reporter wording is tracked in https://github.com/microsoft/vscode/issues/115157. Thanks.

Could you append the full log after this failed? (F1 > Dev Containers: Show Container Log)

max06 commented 2 years ago

Hey @chrmarti

there you go - some details were removed.

Short info about the structure:

Container Log ```log [36 ms] Dev Containers 0.255.2 in VS Code 1.72.0 (64bbfbf67ada9953918d72e1df2f4d8e537d340e). [36 ms] Start: Resolving Remote [89 ms] Start: Check Docker is running [89 ms] Start: Run: docker version --format {{.Server.APIVersion}} [815 ms] Server API version: 1.41 [817 ms] Start: Run: docker volume ls -q [1574 ms] Start: Run: docker build -f C:\Users\max06\AppData\Local\Temp\vsch\bootstrap-image\0.255.2\bootstrap.Dockerfile -t vsc-volume-bootstrap C:\Users\max06\AppData\Local\Temp\vsch\bootstrap-image\0.255.2 Sending build context to Docker daemon 849.4kB Step 1/4 : FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine-3.14 ---> 29fbad96cc78 Step 2/4 : RUN apk add --no-cache nodejs npm make g++ docker-c li docker-compose ; ---> Using cache ---> 438659725e8f Step 3/4 : RUN cd && npm i node-pty ---> Using cache ---> 7bc90a2f2f41 Step 4/4 : COPY .vscode-remote-containers /root/.vscode-remote-containers ---> Using cache ---> 777d433c19cd Successfully built 777d433c19cd Successfully tagged vsc-volume-bootstrap:latest SECURITY WARNING: You are building a Docker image from Windows against a non-Win dows Docker host. All files and directories added to build context will have '-r wxr-xr-x' permissions. It is recommended to double check and reset permissions f or sensitive files and directories. Use 'docker scan' to run Snyk tests against images to find vulnerabilities and l earn how to fix them [6290 ms] Cloning Github repository: unknown-owner/project into /workspaces/project [6290 ms] Start: Run: docker run -d --mount type=volume,src=project,dst=/workspaces -v /var/run/docker.sock:/var/run/docker.sock vsc-volume-bootstrap sleep infinity [8149 ms] Start: Run in container: /bin/sh [8164 ms] Start: Launching Dev Containers helper. [8165 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-58a6032e707bd945e2c30094ba169be967d3c228.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent). [8165 ms] Start: Run: gpgconf --list-dir agent-extra-socket [8237 ms] C:\Users\max06\AppData\Local\gnupg\S.gpg-agent.extra [8237 ms] [8238 ms] Start: Run in container: gpgconf --list-dir agent-socket [9602 ms] /root/.gnupg/S.gpg-agent [9602 ms] [9602 ms] Start: Run in container: gpgconf --list-dir homedir [9605 ms] /root/.gnupg [9605 ms] [9605 ms] Start: Run in container: ls '/root/.gnupg/private-keys-v1.d' 2>/dev/null [9610 ms] [9611 ms] [9611 ms] Exit code 2 [9611 ms] Start: Run in container: mkdir -p -m 700 '/root/.gnupg' [9612 ms] Start: Run in container: /bin/sh [9614 ms] [9614 ms] [9614 ms] Start: Run: gpgconf --list-dir homedir [9627 ms] Start: Run in container: echo ~ [9664 ms] C:\Users\max06\AppData\Roaming\gnupg [9664 ms] [9664 ms] Start: Run in container: gpgconf --list-dir homedir [9667 ms] /root/.gnupg [9667 ms] [9668 ms] Start: Run in container: # Test for /root/.gnupg/pubring.kbx and gpg [9671 ms] [9671 ms] [9671 ms] Start: Run in container: # Copy C:\Users\max06\AppData\Roaming\gnupg\pubring.kbx to /root/.gnupg/pubring.kbx [9675 ms] [9676 ms] [9677 ms] Start: Run in container: # Test for /root/.gnupg/trustdb.gpg and gpg [9679 ms] [9679 ms] [9680 ms] Start: Run in container: # Copy C:\Users\max06\AppData\Roaming\gnupg\trustdb.gpg to /root/.gnupg/trustdb.gpg [9683 ms] [9683 ms] [9683 ms] Start: Run: gpg-connect-agent updatestartuptty /bye [11034 ms] /root [11035 ms] [11035 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-58a6032e707bd945e2c30094ba169be967d3c228.js' >/tmp/vscode-remote-containers-58a6032e707bd945e2c30094ba169be967d3c228.js [11038 ms] [11038 ms] [11038 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-58a6032e707bd945e2c30094ba169be967d3c228.js' >/tmp/vscode-remote-containers-server-58a6032e707bd945e2c30094ba169be967d3c228.js_1665396455193 [11045 ms] [11045 ms] [11047 ms] Start: Run in container: # Test for /root/.gitconfig and git [11050 ms] [11050 ms] [11050 ms] Start: Run in container: # Copy C:\Users\max06\.gitconfig to /root/.gitconfig [11053 ms] [11053 ms] [11054 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { node /tmp/vscode-remote-containers-58a6032e707bd945e2c30094ba169be967d3c228.js $*; }; f' || true [11066 ms] [11066 ms] [11067 ms] Start: Run in container: # Test for /root/.ssh/known_hosts and ssh [11069 ms] [11070 ms] [11070 ms] Start: Run in container: # Copy C:\Users\max06\.ssh\known_hosts to /root/.ssh/known_hosts [11073 ms] [11074 ms] [11148 ms] Start: Run in container: cat /workspaces/project/.devcontainer/devcontainer.json 2>/dev/null [11152 ms] Start: Run in container: cat /workspaces/project/.devcontainer/devcontainer.json 2>/dev/null [11156 ms] Start: Run in container: cat <<'EOF-/tmp/devcontainer-405b6f89-ffbf-4504-9c44-0ef93f01e895.json' >/tmp/devcontainer-405b6f89-ffbf-4504-9c44-0ef93f01e895.json_1665396455311 [11160 ms] [11160 ms] [11160 ms] Start: Run in container: docker volume ls -q [15708 ms] Start: Run: docker inspect --type container 22350bb05974336b6cd339d337a31057244d77d4dd5bba25c7eb7f46b8fa1cf4 [16473 ms] Start: Run in container: docker ps -q -a --filter label=vsch.local.repository=git@git.host:openstack/project.git --filter label=vsch.local.repository.volume=project --filter label=vsch.local.repository.folder=project --filter label=vsch.quality=stable [17945 ms] Start: Run in container: docker ps -q -a --filter label=vsch.local.repository=git@git.host:openstack/project.git --filter label=vsch.local.repository.volume=project --filter label=vsch.local.repository.folder=project [22435 ms] Start: Run in container: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.255.2/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /workspaces/project --workspace-mount-consistency cached --id-label vsch.local.repository=git@git.host:openstack/project.git --id-label vsch.local.repository.volume=project --id-label vsch.local.repository.folder=project --log-level debug --log-format json --config /workspaces/project/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-405b6f89-ffbf-4504-9c44-0ef93f01e895.json --default-user-env-probe loginInteractiveShell --build-no-cache --mount type=volume,source=project,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root true --terminal-columns 264 --terminal-rows 76 [24119 ms] @devcontainers/cli 0.19.0. Node.js v14.20.0. linux 5.15.0-1020-azure x64. [24119 ms] Start: Run: docker buildx version [24150 ms] [24151 ms] docker: 'buildx' is not a docker command. See 'docker --help' [24151 ms] Exit code 1 [24151 ms] Start: Resolving Remote [24155 ms] Start: Run: git rev-parse --show-cdup [24160 ms] Start: Run: docker ps -q -a --filter label=vsch.local.repository=git@git.host:openstack/project.git --filter label=vsch.local.repository.volume=project --filter label=vsch.local.repository.folder=project [24195 ms] Start: Run: docker inspect --type image mcr.microsoft.com/vscode/devcontainers/python:3.10-bullseye [24228 ms] local container features stored at: /root/.vscode-remote-containers/dist/dev-containers-cli-0.255.2/dist/node_modules/vscode-dev-containers/container-features [24230 ms] Start: Run: tar --no-same-owner -x -f - [24274 ms] * Processing feature: homebrew [24275 ms] Cached feature found. [24275 ms] * Fetching feature: homebrew_1_local-cache [24313 ms] Start: Run: docker build -t dev_container_feature_content_temp -f /tmp/devcontainercli-root/container-features/0.19.0-1665396468382/Dockerfile.buildContent /tmp/devcontainercli-root/container-features/0.19.0-1665396468382 Sending build context to Docker daemon 624.1kB Step 1/2 : FROM scratch ---> Step 2/2 : COPY . /tmp/build-features/ ---> Using cache ---> f2651ff6b486 Successfully built f2651ff6b486 Successfully tagged dev_container_feature_content_temp:latest [24437 ms] Start: Run: docker build -f /tmp/devcontainercli-root/container-features/0.19.0-1665396468382/Dockerfile-with-features -t vsc-project-9ac1f2ac89aadbdf89e577e55d9f599c --target dev_containers_target_stage --no-cache --build-arg VARIANT=3.10-bullseye --build-arg NODE_VERSION=lts/* --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/project Sending build context to Docker daemon 756.7MB Step 1/32 : ARG _DEV_CONTAINERS_BASE_IMAGE=placeholder Step 2/32 : ARG VARIANT=3-bullseye Step 3/32 : FROM --platform=amd64 mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} as dev ---> f10c6752e47d Step 4/32 : LABEL name="DevContainer for Project" ---> Running in 2a3267a9b1ac Removing intermediate container 2a3267a9b1ac ---> 72aed3b790c0 Step 5/32 : LABEL version="1.0.0" ---> Running in e3bb115a3f8f Removing intermediate container e3bb115a3f8f ---> 8a0f87be0b79 Step 6/32 : ARG NODE_VERSION="none" ---> Running in 1caf0b055602 Removing intermediate container 1caf0b055602 ---> c6f7f14b704f Step 7/32 : RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi ---> Running in ef075621b58d Downloading and installing node v16.17.1... Downloading https://nodejs.org/dist/v16.17.1/node-v16.17.1-linux-x64.tar.xz... ######################################################################## 100.0% Computing checksum with sha256sum Checksums matched! Now using node v16.17.1 (npm v8.15.0) Creating default alias: default -> lts/* (-> v16.17.1 *) Removing intermediate container ef075621b58d ---> 890e59de0848 Step 8/32 : ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn ---> Running in 723d364d7c57 Removing intermediate container 723d364d7c57 ---> 76ac51155701 Step 9/32 : RUN pip3 --disable-pip-version-check --no-cache-dir install yaspin ---> Running in b7fdd9369ba9 Collecting yaspin Downloading yaspin-2.2.0-py3-none-any.whl (18 kB) Collecting termcolor-whl==1.1.2 Downloading termcolor_whl-1.1.2-py2.py3-none-any.whl (4.8 kB) Installing collected packages: termcolor-whl, yaspin Successfully installed termcolor-whl-1.1.2 yaspin-2.2.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Removing intermediate container b7fdd9369ba9 ---> 47a59d509a63 Step 10/32 : RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && echo "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/hashicorp.list && apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -y install --no-install-recommends dnsutils time qemu-utils terraform iputils-ping ---> Running in 50b0f968b46b OK Hit:1 http://deb.debian.org/debian bullseye InRelease Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB] Get:3 https://apt.releases.hashicorp.com bullseye InRelease [11.2 kB] Hit:4 https://dl.yarnpkg.com/debian stable InRelease Get:5 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB] Get:6 https://apt.releases.hashicorp.com bullseye/main amd64 Packages [68.2 kB] Fetched 172 kB in 1s (310 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: bind9-dnsutils bind9-host bind9-libs libaio1 libfstrm0 libjson-c5 liblmdb0 libprotobuf-c1 liburing1 libuv1 Suggested packages: debootstrap qemu-block-extra The following NEW packages will be installed: bind9-dnsutils bind9-host bind9-libs dnsutils iputils-ping libaio1 libfstrm0 libjson-c5 liblmdb0 libprotobuf-c1 liburing1 libuv1 qemu-utils terraform time 0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded. Need to get 23.4 MB of archives. After this operation, 73.6 MB of additional disk space will be used. Get:1 http://deb.debian.org/debian bullseye/main amd64 iputils-ping amd64 3:20210202-1 [49.8 kB] Get:2 https://apt.releases.hashicorp.com bullseye/main amd64 terraform amd64 1.3.2 [19.5 MB] Get:3 http://deb.debian.org/debian bullseye/main amd64 libuv1 amd64 1.40.0-2 [132 kB] Get:4 http://deb.debian.org/debian bullseye/main amd64 libfstrm0 amd64 0.6.0-1+b1 [21.5 kB] Get:5 http://deb.debian.org/debian bullseye/main amd64 libjson-c5 amd64 0.15-2 [42.8 kB] Get:6 http://deb.debian.org/debian bullseye/main amd64 liblmdb0 amd64 0.9.24-1 [45.0 kB] Get:7 http://deb.debian.org/debian bullseye/main amd64 libprotobuf-c1 amd64 1.3.3-1+b2 [27.0 kB] Get:8 http://deb.debian.org/debian-security bullseye-security/main amd64 bind9-libs amd64 1:9.16.33-1~deb11u1 [1410 kB] Get:9 http://deb.debian.org/debian-security bullseye-security/main amd64 bind9-host amd64 1:9.16.33-1~deb11u1 [306 kB] Get:10 http://deb.debian.org/debian-security bullseye-security/main amd64 bind9-dnsutils amd64 1:9.16.33-1~deb11u1 [400 kB] Get:11 http://deb.debian.org/debian-security bullseye-security/main amd64 dnsutils all 1:9.16.33-1~deb11u1 [265 kB] Get:12 http://deb.debian.org/debian bullseye/main amd64 libaio1 amd64 0.3.112-9 [12.5 kB] Get:13 http://deb.debian.org/debian bullseye/main amd64 liburing1 amd64 0.7-3 [8572 B] Get:14 http://deb.debian.org/debian bullseye/main amd64 qemu-utils amd64 1:5.2+dfsg-11+deb11u2 [1197 kB] Get:15 http://deb.debian.org/debian bullseye/main amd64 time amd64 1.9-0.1 [50.8 kB] Fetched 23.4 MB in 1s (38.7 MB/s) Selecting previously unselected package iputils-ping. (Reading database ... 28117 files and directories currently installed.) Preparing to unpack .../00-iputils-ping_3%3a20210202-1_amd64.deb ... Unpacking iputils-ping (3:20210202-1) ... Selecting previously unselected package libuv1:amd64. Preparing to unpack .../01-libuv1_1.40.0-2_amd64.deb ... Unpacking libuv1:amd64 (1.40.0-2) ... Selecting previously unselected package libfstrm0:amd64. Preparing to unpack .../02-libfstrm0_0.6.0-1+b1_amd64.deb ... Unpacking libfstrm0:amd64 (0.6.0-1+b1) ... Selecting previously unselected package libjson-c5:amd64. Preparing to unpack .../03-libjson-c5_0.15-2_amd64.deb ... Unpacking libjson-c5:amd64 (0.15-2) ... Selecting previously unselected package liblmdb0:amd64. Preparing to unpack .../04-liblmdb0_0.9.24-1_amd64.deb ... Unpacking liblmdb0:amd64 (0.9.24-1) ... Selecting previously unselected package libprotobuf-c1:amd64. Preparing to unpack .../05-libprotobuf-c1_1.3.3-1+b2_amd64.deb ... Unpacking libprotobuf-c1:amd64 (1.3.3-1+b2) ... Selecting previously unselected package bind9-libs:amd64. Preparing to unpack .../06-bind9-libs_1%3a9.16.33-1~deb11u1_amd64.deb ... Unpacking bind9-libs:amd64 (1:9.16.33-1~deb11u1) ... Selecting previously unselected package bind9-host. Preparing to unpack .../07-bind9-host_1%3a9.16.33-1~deb11u1_amd64.deb ... Unpacking bind9-host (1:9.16.33-1~deb11u1) ... Selecting previously unselected package bind9-dnsutils. Preparing to unpack .../08-bind9-dnsutils_1%3a9.16.33-1~deb11u1_amd64.deb ... Unpacking bind9-dnsutils (1:9.16.33-1~deb11u1) ... Selecting previously unselected package dnsutils. Preparing to unpack .../09-dnsutils_1%3a9.16.33-1~deb11u1_all.deb ... Unpacking dnsutils (1:9.16.33-1~deb11u1) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../10-libaio1_0.3.112-9_amd64.deb ... Unpacking libaio1:amd64 (0.3.112-9) ... Selecting previously unselected package liburing1:amd64. Preparing to unpack .../11-liburing1_0.7-3_amd64.deb ... Unpacking liburing1:amd64 (0.7-3) ... Selecting previously unselected package qemu-utils. Preparing to unpack .../12-qemu-utils_1%3a5.2+dfsg-11+deb11u2_amd64.deb ... Unpacking qemu-utils (1:5.2+dfsg-11+deb11u2) ... Selecting previously unselected package time. Preparing to unpack .../13-time_1.9-0.1_amd64.deb ... Unpacking time (1.9-0.1) ... Selecting previously unselected package terraform. Preparing to unpack .../14-terraform_1.3.2_amd64.deb ... Unpacking terraform (1.3.2) ... Setting up liblmdb0:amd64 (0.9.24-1) ... Setting up time (1.9-0.1) ... Setting up libfstrm0:amd64 (0.6.0-1+b1) ... Setting up libprotobuf-c1:amd64 (1.3.3-1+b2) ... Setting up libuv1:amd64 (1.40.0-2) ... Setting up liburing1:amd64 (0.7-3) ... Setting up libaio1:amd64 (0.3.112-9) ... Setting up iputils-ping (3:20210202-1) ... Setting up libjson-c5:amd64 (0.15-2) ... Setting up terraform (1.3.2) ... Setting up bind9-libs:amd64 (1:9.16.33-1~deb11u1) ... Setting up qemu-utils (1:5.2+dfsg-11+deb11u2) ... Setting up bind9-host (1:9.16.33-1~deb11u1) ... Setting up bind9-dnsutils (1:9.16.33-1~deb11u1) ... Setting up dnsutils (1:9.16.33-1~deb11u1) ... Processing triggers for libc-bin (2.31-13+deb11u4) ... Processing triggers for man-db (2.9.4-2) ... Removing intermediate container 50b0f968b46b ---> f893169d140b Step 11/32 : RUN mkdir /home/vscode/.vscode-server && chown vscode.vscode /home/vscode/.vscode-server ---> Running in 8699b5046875 Removing intermediate container 8699b5046875 ---> d4c7ff44c051 Step 12/32 : FROM dev as ci ---> d4c7ff44c051 Step 13/32 : COPY requirements.txt /tmp/pip-tmp/ ---> 1963dacbcc35 Step 14/32 : RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt && rm -rf /tmp/pip-tmp ---> Running in aa3770e679d0 [... stripped ...] Removing intermediate container aa3770e679d0 ---> 7fd4a6012201 Step 15/32 : RUN pip3 --disable-pip-version-check --no-cache-dir install ... ---> Running in 0baa15649efb [... stripped ...] Removing intermediate container 0baa15649efb ---> 5433efa5185e Step 16/32 : RUN ... ---> Running in 45a6a4844c13 [... stripped ...] Removing intermediate container 45a6a4844c13 ---> 61ced7d57591 Step 17/32 : RUN curl https://letsencrypt.org/certs/staging/letsencrypt-stg-int-r3.pem >> $(python -m certifi) && curl https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem >> $(python -m certifi) ---> Running in 0cec8bfa0574 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1919 100 1919 0 0 21087 0 --:--:-- --:--:-- --:--:-- 21322 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2000 100 2000 0 0 22988 0 --:--:-- --:--:-- --:--:-- 22988 Removing intermediate container 0cec8bfa0574 ---> 005533dd90ac Step 18/32 : COPY ... ---> bc5ceb744055 Step 19/32 : COPY ... ---> 02f175451a87 Step 20/32 : RUN ... ---> Running in bb247a8f81ed Removing intermediate container bb247a8f81ed ---> 3d7cce391837 Step 21/32 : COPY ... ---> 488beaff4d4b Step 22/32 : RUN ... ---> Running in 7c53c063cc54 [... stripped ...] Removing intermediate container 7c53c063cc54 ---> e35fe4c9ec3b Step 23/32 : FROM dev_container_feature_content_temp as dev_containers_feature_content_source ---> f2651ff6b486 Step 24/32 : FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage ---> d4c7ff44c051 Step 25/32 : USER root ---> Running in 61e8ce8100dc Removing intermediate container 61e8ce8100dc ---> 562a98bd2908 Step 26/32 : COPY --from=dev_containers_feature_content_source /tmp/build-features/ /tmp/build-features/ ---> 81b5e031f212 Step 27/32 : RUN cd /tmp/build-features/homebrew_1 && chmod +x ./install.sh && ./install.sh ---> Running in b1808aac1b1c (*) Script: homebrew-debian.sh automatic true true Reading package lists... Building dependency tree... Reading state information... bzip2 is already the newest version (1.0.8-4). ca-certificates is already the newest version (20210119). curl is already the newest version (7.74.0-1.3+deb11u3). file is already the newest version (1:5.39-3). fonts-dejavu-core is already the newest version (2.37-2). fonts-dejavu-core set to manually installed. g++ is already the newest version (4:10.2.1-1). git is already the newest version (1:2.30.2-1). locales is already the newest version (2.31-13+deb11u4). less is already the newest version (551-2). make is already the newest version (4.3-4.1). netbase is already the newest version (6.3). openssh-client is already the newest version (1:8.4p1-5+deb11u1). patch is already the newest version (2.7.6-7). sudo is already the newest version (1.9.5p2-3). zlib1g-dev is already the newest version (1:1.2.11.dfsg-2+deb11u2). tzdata is already the newest version (2021a-1+deb11u6). tzdata set to manually installed. The following NEW packages will be installed: uuid-runtime 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 101 kB of archives. After this operation, 224 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian bullseye/main amd64 uuid-runtime amd64 2.36.1-8+deb11u1 [101 kB] Fetched 101 kB in 0s (849 kB/s) Selecting previously unselected package uuid-runtime. (Reading database ... 28239 files and directories currently installed.) Preparing to unpack .../uuid-runtime_2.36.1-8+deb11u1_amd64.deb ... Unpacking uuid-runtime (2.36.1-8+deb11u1) ... Setting up uuid-runtime (2.36.1-8+deb11u1) ... Adding group `uuidd' (GID 102) ... Done. Warning: The home dir /run/uuidd you specified can't be accessed: No such file or directory Adding system user `uuidd' (UID 101) ... Adding new user `uuidd' (UID 101) with group `uuidd' ... Not creating home directory `/run/uuidd'. invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. Processing triggers for man-db (2.9.4-2) ... Installing Homebrew with shallow clone... Cloning into '/home/linuxbrew/.linuxbrew/Homebrew'... Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core'... Updating /etc/bash.bashrc and /etc/zsh/zshrc... Updating /etc/fish/config.fish... ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:fc45ee6eddf4c7a17f4373dde7b1bc8a58255ea61e6847d3bf895225b28d072a ######################################################################## 100.0% ==> Pouring portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz HOMEBREW_VERSION: >=2.5.0 (shallow or no git repository) ORIGIN: https://github.com/Homebrew/brew HEAD: fb52a12144e80118c112ea744ab65ab6ca997d67 Last commit: 2 days ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 18b9751020fa823b884f7ec80eab19deddd64c21 Core tap last commit: 5 minutes ago Core tap branch: master HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew/Homebrew HOMEBREW_CELLAR: /home/linuxbrew/.linuxbrew/Homebrew/Cellar HOMEBREW_CASK_OPTS: [] HOMEBREW_MAKE_JOBS: 32 Homebrew Ruby: 2.6.8 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby CPU: 32-core 64-bit zen Clang: N/A Git: 2.30.2 => /usr/bin/git Curl: 7.74.0 => /usr/bin/curl Kernel: Linux 5.15.0-1020-azure x86_64 GNU/Linux OS: Debian GNU/Linux 11 (bullseye) (bullseye) Host glibc: 2.31 /usr/bin/gcc: 10.2.1 /usr/bin/ruby: N/A glibc: N/A gcc@11: N/A gcc: N/A xorg: N/A Updating /etc/bash.bashrc and /etc/zsh/zshrc... Updating /etc/fish/config.fish... Done! Reading package lists... Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Removing intermediate container b1808aac1b1c ---> 5777752f7602 Step 28/32 : ENV BREW_PREFIX=/home/linuxbrew/.linuxbrew ---> Running in 33af1c888b4a Removing intermediate container 33af1c888b4a ---> a8816f5329d9 Step 29/32 : ENV PATH=${BREW_PREFIX}/sbin:${BREW_PREFIX}/bin:${PATH} ---> Running in ab9282c5a333 Removing intermediate container ab9282c5a333 ---> 75d9dc2ee10e Step 30/32 : ARG _DEV_CONTAINERS_IMAGE_USER=root ---> Running in d2204b672a27 Removing intermediate container d2204b672a27 ---> 00c9b89777c5 Step 31/32 : USER $_DEV_CONTAINERS_IMAGE_USER ---> Running in 3fbfb4266c0e Removing intermediate container 3fbfb4266c0e ---> 601548af53aa Step 32/32 : LABEL devcontainer.metadata="[ {\"id\":\"ghcr.io/devcontainers/features/common-utils:1\"}, {\"id\":\"ghcr.io/devcontainers/features/python:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\"],\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\"}}}}, {\"id\":\"ghcr.io/devcontainers/features/node:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"dbaeumer.vscode-eslint\"]}}}, {\"customizations\":{\"vscode\":{\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.linting.enabled\":true,\"python.linting.pylintEnabled\":true,\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\"},\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\"]}},\"remoteUser\":\"vscode\"}, {\"id\":\"homebrew\"}, {\"postCreateCommand\":\"python .devcontainer/post_create.py\",\"customizations\":{\"vscode\":{\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.linting.enabled\":true,\"python.linting.pylintEnabled\":true,\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\",\"files.autoSave\":\"afterDelay\",\"files.autoSaveDelay\":1000,\"files.insertFinalNewline\":true,\"files.trimFinalNewlines\":true,\"files.associations\":{\"**/ansible/**/*.yml\":\"ansible\",\"**/ansible/**/templates/*\":\"jinja\"}},\"extensions\":[\"ms-python.python\",\"redhat.yaml\",\"wholroyd.jinja\",\"hashicorp.terraform\",\"eamodio.gitlens\",\"ms-vsliveshare.vsliveshare\",\"atlassian.atlascode\",\"gitlab.gitlab-workflow\",\"redhat.ansible\"]}},\"mounts\":[\"source=project-profile,target=/home/vscode,type=volume\",\"target=/home/vscode/.vscode-server,type=volume\"],\"containerEnv\":{\"ANSIBLE_CALLBACK_PLUGINS\":\"/home/vscode/.local/lib/python3.10/site-packages/ara/plugins/callback\",\"ANSIBLE_ACTION_PLUGINS\":\"/home/vscode/.local/lib/python3.10/site-packages/ara/plugins/action\",\"ANSIBLE_LOOKUP_PLUGINS\":\"/home/vscode/.local/lib/python3.10/site-packages/ara/plugins/lookup\",\"ANSIBLE_STRATEGY_PLUGINS\":\"/opt/mitogen-0.3.2/ansible_mitogen/plugins/strategy\",\"ANSIBLE_ROLES_PATH\":\"/workspaces/project/ansible/roles/\",\"ANSIBLE_VAULT_PASSWORD_FILE\":\"/workspaces/project/ansible/.vault.passwd\",\"ANSIBLE_REMOTE_USER\":\"someone\",\"MITOGEN\":\"true\"},\"remoteUser\":\"vscode\"} ]" ---> Running in 9ee2e6f1d57f Removing intermediate container 9ee2e6f1d57f ---> 668569973d69 [Warning] One or more build-args [_DEV_CONTAINERS_FEATURE_CONTENT_SOURCE] were not consumed Successfully built 668569973d69 Successfully tagged vsc-project-9ac1f2ac89aadbdf89e577e55d9f599c:latest [279995 ms] Start: Run: docker -v [280285 ms] Start: Run: docker events --format {{json .}} --filter event=start [280288 ms] Start: Starting container [280288 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount source=project-profile,target=/home/vscode,type=volume --mount target=/home/vscode/.vscode-server,type=volume --mount type=volume,src=project,dst=/workspaces --mount type=volume,src=vscode,dst=/vscode -l vsch.local.repository=git@git.host:openstack/project.git -l vsch.local.repository.volume=project -l vsch.local.repository.folder=project -e ANSIBLE_CALLBACK_PLUGINS=/home/vscode/.local/lib/python3.10/site-packages/ara/plugins/callback -e ANSIBLE_ACTION_PLUGINS=/home/vscode/.local/lib/python3.10/site-packages/ara/plugins/action -e ANSIBLE_LOOKUP_PLUGINS=/home/vscode/.local/lib/python3.10/site-packages/ara/plugins/lookup -e ANSIBLE_STRATEGY_PLUGINS=/opt/mitogen-0.3.2/ansible_mitogen/plugins/strategy -e ANSIBLE_ROLES_PATH=/workspaces/project/ansible/roles/ -e ANSIBLE_VAULT_PASSWORD_FILE=/workspaces/project/ansible/.vault.passwd -e ANSIBLE_REMOTE_USER=someone -e MITOGEN=true --entrypoint /bin/sh vsc-project-9ac1f2ac89aadbdf89e577e55d9f599c -c echo Container started Container started [280755 ms] Start: Run: docker ps -q -a --filter label=vsch.local.repository=git@git.host:openstack/project.git --filter label=vsch.local.repository.volume=project --filter label=vsch.local.repository.folder=project [280792 ms] Start: Run: docker inspect --type container 6f1d49286bdd [280827 ms] Start: Inspecting container [280828 ms] Start: Run: docker inspect --type container 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 [280865 ms] Start: Run in container: /bin/sh [280868 ms] Start: Run in container: uname -m [280968 ms] x86_64 [280968 ms] [280969 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null [280971 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [280971 ms] [280971 ms] Start: Run in container: cat /etc/passwd [280974 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcEnvironmentMarker' [280976 ms] [280976 ms] [280976 ms] Exit code 1 [280978 ms] Start: Run in container: /bin/sh [280981 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcEnvironmentMarker' ; } 2> /dev/null [281106 ms] [281106 ms] [281106 ms] Start: Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF' [281108 ms] [281109 ms] [281109 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcProfileMarker' [281110 ms] [281110 ms] [281110 ms] Exit code 1 [281111 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcProfileMarker' ; } 2> /dev/null [281113 ms] [281113 ms] [281113 ms] Start: Run in container: sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1${PATH:-\3}/g' /etc/profile || true [281117 ms] [281117 ms] [281077 ms] Start: Run: docker inspect --type container 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 [282148 ms] Start: Run in container: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.255.2/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /workspaces/project --container-id 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 --log-level debug --log-format json --config /workspaces/project/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-405b6f89-ffbf-4504-9c44-0ef93f01e895.json --mount-workspace-git-root true [284110 ms] @devcontainers/cli 0.19.0. Node.js v14.20.0. linux 5.15.0-1020-azure x64. [284110 ms] Start: Run: git rev-parse --show-cdup [284163 ms] Start: Run: docker inspect --type container 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 [284148 ms] Start: Run in container: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.255.2/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /workspaces/project --container-id 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 --log-level debug --log-format json --config /workspaces/project/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-405b6f89-ffbf-4504-9c44-0ef93f01e895.json --include-merged-configuration --mount-workspace-git-root true [285912 ms] @devcontainers/cli 0.19.0. Node.js v14.20.0. linux 5.15.0-1020-azure x64. [285912 ms] Start: Run: git rev-parse --show-cdup [285921 ms] Start: Run: docker inspect --type container 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 [285904 ms] Start: Inspecting container [285904 ms] Start: Run: docker inspect --type container 6f1d49286bdd6162ec2aac070beb4c11b11e52ad9485dcd146e9c1b8864634f2 [286607 ms] Start: Run in container: /bin/sh [286620 ms] Start: Run in container: uname -m [288041 ms] x86_64 [288041 ms] [288041 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null [288044 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [288044 ms] [288044 ms] Start: Run in container: cat /etc/passwd [288046 ms] Start: Run in container: /bin/sh [288057 ms] Start: Run in container: stat -c %u /workspaces/project [289439 ms] 1000 [289440 ms] [289440 ms] Start: Run in container: stat -c %u /workspaces/project/.devcontainer/devcontainer.json [289442 ms] 1000 [289443 ms] [289443 ms] Start: Updating configuration state [289480 ms] Start: Setup shutdown monitor [289480 ms] Forking shutdown monitor: c:\Users\max06\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.2\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-31148816e4b3f65945126c4cfb193fdc20ab9fa6-sock singleContainer Debug c:\Users\max06\AppData\Roaming\Code\logs\20221007T132140\exthost1\ms-vscode-remote.remote-containers 1665396444155 [289491 ms] Start: Run in container: test -d /home/vscode/.vscode-server [289493 ms] [289493 ms] [289493 ms] Start: Run in container: test ! -f '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/vscode/.vscode-server/data/Machine' && { > '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null [289497 ms] [289497 ms] [289497 ms] Start: Run in container: mkdir -p '/home/vscode/.vscode-server/data/Machine' && cat >'/home/vscode/.vscode-server/data/Machine/settings.json' <<'settingsJSON' [289501 ms] [289501 ms] [289502 ms] Start: Run in container: test -d /home/vscode/.vscode-server/bin/64bbfbf67ada9953918d72e1df2f4d8e537d340e [289504 ms] [289504 ms] [289504 ms] Exit code 1 [289504 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/64bbfbf67ada9953918d72e1df2f4d8e537d340e [289506 ms] [289506 ms] [289506 ms] Start: Run in container: mkdir -p '/home/vscode/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/64bbfbf67ada9953918d72e1df2f4d8e537d340e' '/home/vscode/.vscode-server/bin/64bbfbf67ada9953918d72e1df2f4d8e537d340e' [289510 ms] [289510 ms] [289511 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-x64/64bbfbf67ada9953918d72e1df2f4d8e537d340e' [289511 ms] Start: Launching Dev Containers helper. [289511 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-fb207a895592b02717343a48e7a417f5cd4c021b.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent). [289511 ms] Start: Run: gpgconf --list-dir agent-extra-socket [289513 ms] [289514 ms] [289558 ms] C:\Users\max06\AppData\Local\gnupg\S.gpg-agent.extra [289558 ms] [289559 ms] Start: Run in container: gpgconf --list-dir agent-socket [289562 ms] /home/vscode/.gnupg/S.gpg-agent [289562 ms] [289562 ms] Start: Run in container: gpgconf --list-dir homedir [289565 ms] /home/vscode/.gnupg [289566 ms] [289566 ms] Start: Run in container: ls '/home/vscode/.gnupg/private-keys-v1.d' 2>/dev/null [289569 ms] [289569 ms] [289569 ms] Start: Run in container: mkdir -p -m 700 '/home/vscode/.gnupg' [289569 ms] Start: Run in container: /bin/sh [289570 ms] userEnvProbe: loginInteractiveShell (default) [289571 ms] userEnvProbe shell: /bin/bash [289572 ms] [289572 ms] [289573 ms] Start: Run in container: # Test for /home/vscode/.ssh/known_hosts and ssh [289573 ms] Start: Run: gpgconf --list-dir homedir [289574 ms] /home/vscode/.ssh/known_hosts exists [289575 ms] [289575 ms] Exit code 1 [289575 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/vscode/.vscode-server/bin/64bbfbf67ada9953918d72e1df2f4d8e537d340e/node /tmp/vscode-remote-containers-fb207a895592b02717343a48e7a417f5cd4c021b.js $*; }; f' || true [289579 ms] [289579 ms] [289580 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr " [289590 ms] Start: Run in container: echo ~ [289613 ms] Start: Run in container: cat '/home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e' 2>/dev/null || (umask 377 && echo 'fcdcc3ac-beca-4794-b43b-db68649797b4' >'/home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e-4b32143e-ad65-4d7f-807f-4d2d90a064b6' && mv -n '/home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e-4b32143e-ad65-4d7f-807f-4d2d90a064b6' '/home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e' && rm -f '/home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e-4b32143e-ad65-4d7f-807f-4d2d90a064b6' && cat '/home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e') [289619 ms] fcdcc3ac-beca-4794-b43b-db68649797b4 [289620 ms] [289620 ms] Start: Starting VS Code Server [289620 ms] Start: Preparing Extensions [289620 ms] Start: Run in container: test ! -f '/home/vscode/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/vscode/.vscode-server/data/Machine' && { > '/home/vscode/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null [289624 ms] [289624 ms] [289626 ms] Extensions cache, install extensions: ms-python.python, ms-python.vscode-pylance, dbaeumer.vscode-eslint, redhat.yaml, wholroyd.jinja, hashicorp.terraform, eamodio.gitlens, ms-vsliveshare.vsliveshare, atlassian.atlascode, gitlab.gitlab-workflow, redhat.ansible [289626 ms] Start: Run in container: test -d /home/vscode/.vscode-server/extensionsCache && ls /home/vscode/.vscode-server/extensionsCache || true [289628 ms] [289628 ms] [289628 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true [289630 ms] C:\Users\max06\AppData\Roaming\gnupg [289630 ms] [289632 ms] atlassian.atlascode-2.10.12 davidanson.vscode-markdownlint-0.48.1 dbaeumer.vscode-eslint-2.2.6 eamodio.gitlens-12.2.0 eamodio.gitlens-12.2.1 eamodio.gitlens-12.2.2 editorconfig.editorconfig-0.16.4 github.remotehub-0.42.0 github.remotehub-0.44.0 github.vscode-pull-request-github-0.50.0 gitlab.gitlab-workflow-3.48.1 gitlab.gitlab-workflow-3.49.0 gitlab.gitlab-workflow-3.50.0 gitlab.gitlab-workflow-3.51.0 gitlab.gitlab-workflow-3.52.0 hashicorp.terraform-2.24.0-linux-x64 hashicorp.terraform-2.24.1-linux-x64 hashicorp.terraform-2.24.2-linux-x64 ibm.output-colorizer-0.1.2 ms-python.python-2022.12.1 ms-python.python-2022.14.0 ms-python.python-2022.16.0 ms-python.vscode-pylance-2022.10.10 ms-python.vscode-pylance-2022.8.30 ms-python.vscode-pylance-2022.8.40 ms-python.vscode-pylance-2022.8.50 ms-python.vscode-pylance-2022.9.10 ms-python.vscode-pylance-2022.9.20 ms-python.vscode-pylance-2022.9.30 ms-python.vscode-pylance-2022.9.40 ms-toolsai.jupyter-2022.9.1002791758 ms-toolsai.jupyter-keymap-1.0.0 ms-toolsai.jupyter-renderers-1.0.10 ms-toolsai.vscode-jupyter-cell-tags-0.1.6 ms-toolsai.vscode-jupyter-slideshow-0.1.5 ms-vscode.remote-repositories-0.22.0 ms-vsliveshare.vsliveshare-1.0.5690 ms-vsliveshare.vsliveshare-1.0.5695 ms-vsliveshare.vsliveshare-1.0.5705 ms-vsliveshare.vsliveshare-1.0.5711 ms-vsliveshare.vsliveshare-1.0.5719 ms-vsliveshare.vsliveshare-1.0.5723 ms-vsliveshare.vsliveshare-1.0.5733 ms-vsliveshare.vsliveshare-audio-0.1.91 redhat.ansible-0.12.30 redhat.ansible-0.13.59 redhat.ansible-0.14.71 redhat.vscode-yaml-1.10.1 wholroyd.jinja-0.0.8 [289632 ms] [289632 ms] Start: Run in container: gpgconf --list-dir homedir [289632 ms] Extensions cache, link in container: atlassian.atlascode-2.10.12, dbaeumer.vscode-eslint-2.2.6, eamodio.gitlens-12.2.0, eamodio.gitlens-12.2.1, eamodio.gitlens-12.2.2, gitlab.gitlab-workflow-3.48.1, gitlab.gitlab-workflow-3.49.0, gitlab.gitlab-workflow-3.50.0, gitlab.gitlab-workflow-3.51.0, gitlab.gitlab-workflow-3.52.0, hashicorp.terraform-2.24.0-linux-x64, hashicorp.terraform-2.24.1-linux-x64, hashicorp.terraform-2.24.2-linux-x64, ms-python.python-2022.12.1, ms-python.python-2022.14.0, ms-python.python-2022.16.0, ms-python.vscode-pylance-2022.10.10, ms-python.vscode-pylance-2022.8.30, ms-python.vscode-pylance-2022.8.40, ms-python.vscode-pylance-2022.8.50, ms-python.vscode-pylance-2022.9.10, ms-python.vscode-pylance-2022.9.20, ms-python.vscode-pylance-2022.9.30, ms-python.vscode-pylance-2022.9.40, ms-vsliveshare.vsliveshare-1.0.5690, ms-vsliveshare.vsliveshare-1.0.5695, ms-vsliveshare.vsliveshare-1.0.5705, ms-vsliveshare.vsliveshare-1.0.5711, ms-vsliveshare.vsliveshare-1.0.5719, ms-vsliveshare.vsliveshare-1.0.5723, ms-vsliveshare.vsliveshare-1.0.5733, ms-vsliveshare.vsliveshare-audio-0.1.91, redhat.ansible-0.12.30, redhat.ansible-0.13.59, redhat.ansible-0.14.71, wholroyd.jinja-0.0.8 [289635 ms] /home/vscode/.gnupg [289635 ms] [289635 ms] Start: Run in container: mkdir -p '/home/vscode/.vscode-server/extensionsCache' && ln -s '/vscode/vscode-server/extensionsCache'/* '/home/vscode/.vscode-server/extensionsCache' || true [289641 ms] [289641 ms] [289641 ms] Start: Run in container: # Test for /home/vscode/.gnupg/pubring.kbx and gpg [289641 ms] Start: Run in container: cd /vscode/vscode-server/extensionsCache && touch 'atlassian.atlascode-2.10.12' 'dbaeumer.vscode-eslint-2.2.6' 'eamodio.gitlens-12.2.0' 'eamodio.gitlens-12.2.1' 'eamodio.gitlens-12.2.2' 'gitlab.gitlab-workflow-3.48.1' 'gitlab.gitlab-workflow-3.49.0' 'gitlab.gitlab-workflow-3.50.0' 'gitlab.gitlab-workflow-3.51.0' 'gitlab.gitlab-workflow-3.52.0' 'hashicorp.terraform-2.24.0-linux-x64' 'hashicorp.terraform-2.24.1-linux-x64' 'hashicorp.terraform-2.24.2-linux-x64' 'ms-python.python-2022.12.1' 'ms-python.python-2022.14.0' 'ms-python.python-2022.16.0' 'ms-python.vscode-pylance-2022.10.10' 'ms-python.vscode-pylance-2022.8.30' 'ms-python.vscode-pylance-2022.8.40' 'ms-python.vscode-pylance-2022.8.50' 'ms-python.vscode-pylance-2022.9.10' 'ms-python.vscode-pylance-2022.9.20' 'ms-python.vscode-pylance-2022.9.30' 'ms-python.vscode-pylance-2022.9.40' 'ms-vsliveshare.vsliveshare-1.0.5690' 'ms-vsliveshare.vsliveshare-1.0.5695' 'ms-vsliveshare.vsliveshare-1.0.5705' 'ms-vsliveshare.vsliveshare-1.0.5711' 'ms-vsliveshare.vsliveshare-1.0.5719' 'ms-vsliveshare.vsliveshare-1.0.5723' 'ms-vsliveshare.vsliveshare-1.0.5733' 'ms-vsliveshare.vsliveshare-audio-0.1.91' 'redhat.ansible-0.12.30' 'redhat.ansible-0.13.59' 'redhat.ansible-0.14.71' 'wholroyd.jinja-0.0.8' [289642 ms] Start: Run in container: /home/vscode/.vscode-server/bin/64bbfbf67ada9953918d72e1df2f4d8e537d340e/bin/code-server --log debug --force-disable-user-env --server-data-dir /home/vscode/.vscode-server --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/vscode/.vscode-server/data/Machine/.connection-token-64bbfbf67ada9953918d72e1df2f4d8e537d340e --extensions-download-dir /home/vscode/.vscode-server/extensionsCache --install-extension ms-python.python --install-extension ms-python.vscode-pylance --install-extension dbaeumer.vscode-eslint --install-extension redhat.yaml --install-extension wholroyd.jinja --install-extension hashicorp.terraform --install-extension eamodio.gitlens --install-extension ms-vsliveshare.vsliveshare --install-extension atlassian.atlascode --install-extension gitlab.gitlab-workflow --install-extension redhat.ansible --start-server [289643 ms] /home/vscode/.gnupg/pubring.kbx exists [289643 ms] [289643 ms] Exit code 1 [289644 ms] Start: Run in container: # Test for /home/vscode/.gnupg/trustdb.gpg and gpg [289646 ms] /home/vscode/.gnupg/trustdb.gpg exists [289646 ms] [289647 ms] Exit code 1 [289647 ms] Start: Run: gpg-connect-agent updatestartuptty /bye [289652 ms] [289652 ms] [290967 ms] /home/vscode [290967 ms] [290967 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-fb207a895592b02717343a48e7a417f5cd4c021b.js' >/tmp/vscode-remote-containers-fb207a895592b02717343a48e7a417f5cd4c021b.js [290970 ms] [290970 ms] [290970 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-fb207a895592b02717343a48e7a417f5cd4c021b.js' >/tmp/vscode-remote-containers-server-fb207a895592b02717343a48e7a417f5cd4c021b.js_1665396735125 [290977 ms] [290978 ms] [291093 ms] * * Visual Studio Code Server * * By using the software, you agree to * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement). * [291097 ms] Server bound to 127.0.0.1:43267 (IPv4) Extension host agent listening on 43267 ... ```
chrmarti commented 2 years ago

Could you also append /tmp/devcontainercli-root/container-features/0.19.0-1665396468382/Dockerfile-with-features? I see the target being passed in with --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev.

max06 commented 2 years ago

Not sure if that's the correct file - I only found one at /tmp/build-features/Dockerfile-with-features inside the container. Passing you its content below.

contents ```Dockerfile # syntax=docker/dockerfile:1.4 ARG _DEV_CONTAINERS_BASE_IMAGE=placeholder # [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster ARG VARIANT="3.10-bullseye" FROM python:${VARIANT} AS dev_container_auto_added_stage_label RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131 && apt-get purge -y imagemagick imagemagick-6-common # [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. # COPY requirements.txt /tmp/pip-tmp/ # RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ # && rm -rf /tmp/pip-tmp # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommends # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.6-buster" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:33:16 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.7-buster" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:36:23 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.8-buster" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:38:23 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.9-buster" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:40:08 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.10-buster" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:41:55 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.6-bullseye" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:43:49 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.7-bullseye" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 22:59:24 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.8-bullseye" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 23:12:00 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.9-bullseye" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 23:23:53 GMT" COPY meta.env /usr/local/etc/vscode-dev-containers/ LABEL version="0.203.11" LABEL dev.containers.id="python" LABEL dev.containers.variant="3.10-bullseye" LABEL dev.containers.release="v0.2.17" LABEL dev.containers.source="https://github.com/devcontainers/images" LABEL dev.containers.timestamp="Thu, 06 Oct 2022 23:36:35 GMT" FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage USER root COPY --from=dev_containers_feature_content_source . /tmp/build-features/ RUN cd /tmp/build-features/common-utils_1 \ && chmod +x ./devcontainer-features-install.sh \ && ./devcontainer-features-install.sh ENV PYTHON_PATH=/usr/local/python/current ENV PIPX_HOME=/usr/local/py-utils ENV PIPX_BIN_DIR=/usr/local/py-utils/bin ENV PATH=/usr/local/python/current/bin:/usr/local/py-utils/bin:${PATH} RUN cd /tmp/build-features/python_2 \ && chmod +x ./devcontainer-features-install.sh \ && ./devcontainer-features-install.sh ENV NVM_DIR=/usr/local/share/nvm ENV NVM_SYMLINK_CURRENT=true ENV PATH=/usr/local/share/nvm/current/bin:${PATH} RUN cd /tmp/build-features/node_3 \ && chmod +x ./devcontainer-features-install.sh \ && ./devcontainer-features-install.sh ARG _DEV_CONTAINERS_IMAGE_USER=root USER $_DEV_CONTAINERS_IMAGE_USER LABEL devcontainer.metadata="[ \ {\"id\":\"ghcr.io/devcontainers/features/common-utils:1\"}, \ {\"id\":\"ghcr.io/devcontainers/features/python:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\"],\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\"}}}}, \ {\"id\":\"ghcr.io/devcontainers/features/node:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"dbaeumer.vscode-eslint\"]}}}, \ {\"customizations\":{\"vscode\":{\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.linting.enabled\":true,\"python.linting.pylintEnabled\":true,\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\"},\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\"]}},\"remoteUser\":\"vscode\"} \ ]" ```
joda01 commented 2 years ago

I have the same problem with v0.255.2 when starting the dev container all stages are built. My configuration file looks like this:

{
    "name": "application",
    "dockerFile": "../Dockerfile",
    "build": {
        "target": "devel"
    },
    "context": "..",
    "remoteUser": "devel",
    "runArgs": [
        "--volume=${localWorkspaceFolder}:/workspace:z",
        "-e=IMAGE_DEBUG=false"
    ],
    "workspaceFolder": "/workspace"
}
max06 commented 2 years ago

@joda01 why does your config look so different to mine? At least dockerFile and context are inside of build for me...

joda01 commented 2 years ago

@max06 I tookk this from an official Microsoft example, but you're right the reference tells us to do different:

https://containers.dev/implementors/json_reference/#:~:text=A%20devcontainer.,with%20Comments%20(jsonc)%20format.

There is a gap somewhere in the documentation. The plugin tells me to put the dockerFile key on top, the documentation tells to put it into build.dockerFile.

Okay; seems to be legacy stuff: On top it is called dockerFile in build it is called build.dockerfile (upper lower case difference) corrected it, but same behaviour


{
    "name": "application",
    "build": {
        "dockerfile": "../Dockerfile",
        "target": "devel",
        "context": ".."
    },
    "remoteUser": "devel",
    "runArgs": [
        "--volume=${localWorkspaceFolder}:/workspace:z",
        "-e=IMAGE_DEBUG=false"
    ],
    "workspaceFolder": "/workspace"
}
chrmarti commented 2 years ago

@max06 That's a different Dockerfile-with-features (used to build the base image). Maybe the one I was referring to was already gone from the tmp folder when you checked. Could you rerun "Reopen in Container" and check the log for the latest Dockerfile-with-features' path and post its contents here? Thanks.

@joda01 Could you append the full log (F1 > Dev Containers: Show Container Log) from when this fails and also append the Dockerfile-with-features file listed in the log?

chrmarti commented 2 years ago

@samruddhikhandale Do you know where the long list of LABEL instructions come from in the Dockerfile in https://github.com/microsoft/vscode-remote-release/issues/7308#issuecomment-1274357171? I think we are adding these for the base images, for some reason they are repeated several times.

max06 commented 2 years ago

Good morning @chrmarti

I was able to dig a bit deeper: The problem only seems to occur when the cloned repository is in a docker volume.

I modified one of my debugging repositories to allow easy reproduction for you: https://github.com/max06/ansible-lint-debug You'll find 2 stages in the Dockerfile, stage1 (used as target) and stage2.

Cloning the repository and reopening it in its devcontainer works:

[+] Building 3.5s (15/15) FINISHED                                              
 => [internal] load build definition from Dockerfile-with-features         0.0s
 => => transferring dockerfile: 4.85kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => resolve image config for docker.io/docker/dockerfile:1.4               1.1s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531b  0.0s
 => [internal] load .dockerignore                                          0.0s
 => [internal] load build definition from Dockerfile-with-features         0.0s
 => [internal] load metadata for mcr.microsoft.com/vscode/devcontainers/p  0.0s
 => [context dev_containers_feature_content_source] load .dockerignore     0.0s
 => => transferring dev_containers_feature_content_source: 2B              0.0s
 => [stage1 1/3] FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.1  0.0s
 => [context dev_containers_feature_content_source] load from client       0.1s
 => => transferring dev_containers_feature_content_source: 276.06kB        0.0s
 => CACHED [stage1 2/3] RUN if [ "lts/*" != "none" ]; then su vscode -c "  0.0s
 => CACHED [stage1 3/3] RUN echo This is stage1                            0.0s
 => [dev_containers_target_stage 1/1] COPY --from=dev_containers_feature_  0.0s
 => exporting to image                                                     0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:aba81a7d1b1691ef344c1dca1717338ff972f3c7600b2  0.0s
 => => naming to docker.io/library/vsc-ansible-lint-debug-6dd509058e3aa14  0.0s
 => exporting cache                                                        0.0s
 => => preparing build cache for export                                    0.0s

It stops after stage1 3/3 - that's the expected result. This also generates the Dockerfile you asked for, attaching it here.

Dockerfile ```Dockerfile # syntax=docker/dockerfile:1.4 ARG _DEV_CONTAINERS_BASE_IMAGE=placeholder # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3/.devcontainer/base.Dockerfile # [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster ARG VARIANT="3.10-bullseye" FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} as stage1 # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi RUN echo This is stage1 # [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. # COPY requirements.txt /tmp/pip-tmp/ # RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ # && rm -rf /tmp/pip-tmp # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommends # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 FROM stage1 as stage2 RUN echo This is stage2 and you should not see this FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage USER root COPY --from=dev_containers_feature_content_source . /tmp/build-features/ ARG _DEV_CONTAINERS_IMAGE_USER=root USER $_DEV_CONTAINERS_IMAGE_USER LABEL devcontainer.metadata="[ \ {\"id\":\"ghcr.io/devcontainers/features/common-utils:1\"}, \ {\"id\":\"ghcr.io/devcontainers/features/python:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\"],\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\"}}}}, \ {\"id\":\"ghcr.io/devcontainers/features/node:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"dbaeumer.vscode-eslint\"]}}}, \ {\"customizations\":{\"vscode\":{\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.linting.enabled\":true,\"python.linting.pylintEnabled\":true,\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\"},\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\"]}},\"remoteUser\":\"vscode\"}, \ {\"postCreateCommand\":\"pip3 install --user -r requirements.txt\",\"customizations\":{\"vscode\":{\"settings\":{\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.linting.enabled\":true,\"python.linting.pylintEnabled\":true,\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\",\"ansibleServer.trace.server\":\"verbose\",\"files.associations\":{\"*.yml\":\"ansible\"}},\"extensions\":[\"ms-python.python\",\"ms-python.vscode-pylance\",\"redhat.ansible\"]}},\"remoteUser\":\"vscode\"} \ ]" ```

Repeating the process with Clone Repository in container volume ends up with all stages being built. It might be important: I'm using a remote host, by setting a docker context. I also tried connecting to the ssh target first running the devcontainer extension there, getting the same results. This is the only way for me to test your "Reopen in Container"-functionality.

I'm not sure where your requested Dockerfile gets created when I'm using a docker volume - could be your initial docker container. I'd need further instructions for that...

Edit: One more observation. Using a docker volume in combination with my remote docker context causes red messages during build, complaining about missing docker buildx. I made sure both my docker clients (locally on Windows and remote on linux) have the buildkit extension installed and ready. The only option left (for me): your initial build container is missing buildkit.

samruddhikhandale commented 2 years ago

@samruddhikhandale Do you know where the long list of LABEL instructions come from in the Dockerfile in #7308 (comment)? I think we are adding these for the base images, for some reason they are repeated several times.

@chrmarti We are adding labels to the images in here. It's strange that they are repeating, I'll take a look.

eortega-pjr commented 2 years ago

I'm seeing the same issue. It appears that the multi-stage build is defaulting to the final stage. Is there a way to inspect --target dev_containers_target_stage?

Thanks.

chrmarti commented 2 years ago

@max06 Thanks for providing the repository! Unfortunately I can't reproduce the issue with that. Could you retry with Dev Containers (renamed from Remote-Containers) v0.262.1-pre-release? (That also comes with BuildKit installed in the temporary container.)

max06 commented 2 years ago

@chrmarti Using 0.262.1 pre-release paints a different picture.

 => [context dev_containers_feature_content_source] load from client                                                                                                                                                                                               0.0s
 => => transferring dev_containers_feature_content_source: 276.42kB                                                                                                                                                                                                0.0s
 => [stage1 2/3] RUN if [ "lts/*" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install lts/* 2>&1"; fi                                                                                                                      28.0s
 => [stage1 3/3] RUN echo This is stage1                                                                                                                                                                                                                           0.4s
 => [dev_containers_target_stage 1/2] COPY --from=dev_containers_feature_content_source . /tmp/build-features/                                                                                                                                                     0.1s 
 => [dev_containers_target_stage 2/2] RUN echo "_CONTAINER_USER_HOME=$(getent passwd root | cut -d: -f6)" >> /tmp/build-features/devcontainer-features.builtin.env && echo "_REMOTE_USER_HOME=$(getent passwd vscode | cut -d: -f6)" >> /tmp/build-features/devco  0.4s 
 => exporting to image                                                                                                                                                                                                                                             0.1s 
 => => exporting layers                                                                                                                                                                                                                                            0.0s 
 => => writing image sha256:eef234583e9159f39eb8fa1bd5bd0d833ea04a069676f100b9a76c4ea235b74a                                                                                                                                                                       0.0s 
 => => naming to docker.io/library/vsc-ansible-lint-debug-f269a658cec8196ad1ca8ea3212fef5e                                                                                                                                                                         0.0s
 => exporting cache                                                                                                                                                                                                                                                0.0s
 => => preparing build cache for export                                                                                                                                                                                                                            0.0s

I can no longer see stage2 in there, the issue is gone for me - I've rebuilt my regular project container as well and it's much better now. And I can confirm a functioning buildkit.

Whatever you did in between those 2 versions seems to have fixed it, thank you very much šŸ™‡šŸ¼ā€ā™‚ļø

I've just got reminded about a small inconvenience: The notification in the bottom right is stuck at "cloning repository" when building in a docker volume. Nothing bad or to worry about, just a bit irritating. I can open a regular issue for that if needed.

eortega-pjr commented 1 year ago

I made a slight modification to the devcontainer.json to put target within the build scope, along with updating to v0.262.3, and the correct stage is now built.

Of note, we hadn't touched the devcontainer.json in months and yet target seemed to previously work as expected, which led me to finding this issue.

In any case, this is now closed for us.

github-actions[bot] commented 1 year ago

Hey @chrmarti, this issue might need further attention.

@max06, you can help us out by closing this issue if the problem no longer exists, or adding more information.

max06 commented 1 year ago

Nothing more to do here - thanks everyone šŸ™‡šŸ¼ā€ā™‚ļø