hi all,
i build the environment ,it get “unable to prepare context: unable to get relative Dockerfile path Rel: can’t ma
ke R:\Temp\devcontainercli\container-features\0.50.0-1694015292266\Dockerfile-wi
th-features relative to C:\Users\steve\esp\Embeded”
ps, the system templete directory “R” is an RAM disk.
and i can build docker existing Docker image from Docker Hub(vs code and wsl is work)
how to solve this and Provide some advisory information
platform :
Windows 11 64-bit
Linux LAPTOP-436CQ9L1 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
——————————————
full log :
[2023-09-06T15:48:09.184Z] Dev Containers 0.304.0 in VS Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794).
[2023-09-06T15:48:09.184Z] Start: Resolving Remote
[2023-09-06T15:48:09.208Z] Setting up container for folder or workspace: c:\Users\steve\esp\Embeded
[2023-09-06T15:48:09.209Z] Start: Run: wsl -l -v
[2023-09-06T15:48:09.366Z] Stop (157 ms): Run: wsl -l -v
[2023-09-06T15:48:09.366Z] Start: Run: wsl -d Ubuntu -e /bin/sh -c echo ~
[2023-09-06T15:48:09.571Z] Stop (205 ms): Run: wsl -d Ubuntu -e /bin/sh -c echo ~
[2023-09-06T15:48:09.573Z] Start: Run: wsl -d Ubuntu -e /bin/sh -c cd ‘/home/steven’ && /bin/sh
[2023-09-06T15:48:09.578Z] Start: Run in host: id -un
[2023-09-06T15:48:09.786Z] steven
[2023-09-06T15:48:09.787Z]
[2023-09-06T15:48:09.787Z] Stop (209 ms): Run in host: id -un
[2023-09-06T15:48:09.787Z] Start: Run in host: getent passwd steven
[2023-09-06T15:48:09.788Z] Stop (1 ms): Run in host: getent passwd steven
[2023-09-06T15:48:09.788Z] Start: Run in host: echo ~
[2023-09-06T15:48:09.789Z] /home/steven
[2023-09-06T15:48:09.789Z]
[2023-09-06T15:48:09.789Z] Stop (1 ms): Run in host: echo ~
[2023-09-06T15:48:09.790Z] Start: Run in host: test -x ‘/home/steven/.vscode-remote-containers/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node’
[2023-09-06T15:48:09.791Z]
[2023-09-06T15:48:09.791Z]
[2023-09-06T15:48:09.791Z] Stop (1 ms): Run in host: test -x ‘/home/steven/.vscode-remote-containers/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node’
[2023-09-06T15:48:09.791Z] Start: Run in host: test -f ‘/home/steven/.vscode-remote-containers/dist/vscode-remote-containers-server-0.304.0.js’
[2023-09-06T15:48:09.792Z]
[2023-09-06T15:48:09.792Z]
[2023-09-06T15:48:09.792Z] Stop (1 ms): Run in host: test -f ‘/home/steven/.vscode-remote-containers/dist/vscode-remote-containers-server-0.304.0.js’
[2023-09-06T15:48:09.794Z] userEnvProbe: loginInteractiveShell (default)
[2023-09-06T15:48:09.795Z] userEnvProbe: not found in cache
[2023-09-06T15:48:09.795Z] userEnvProbe shell: /bin/bash
[2023-09-06T15:48:10.024Z] userEnvProbe PATHs:
Probe: ‘/home/steven/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/usbipd-win/:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/CMake/bin:/Docker/host/bin:/mnt/c/Users/steve/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/steve/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/home/steven/.local/bin’
Container: None
[2023-09-06T15:48:10.030Z] Start: Run in Host: wslpath -w /run/user/1000/wayland-0
[2023-09-06T15:48:10.033Z] Stop (3 ms): Run in Host: wslpath -w /run/user/1000/wayland-0
[2023-09-06T15:48:10.034Z] Start: Check Docker is running
[2023-09-06T15:48:10.034Z] Start: Run: docker version --format {{.Server.APIVersion}}
[2023-09-06T15:48:10.196Z] Stop (162 ms): Run: docker version --format {{.Server.APIVersion}}
[2023-09-06T15:48:10.196Z] Server API version: 1.43
[2023-09-06T15:48:10.196Z] Stop (162 ms): Check Docker is running
[2023-09-06T15:48:10.197Z] Start: Run: docker volume ls -q
[2023-09-06T15:48:10.350Z] Stop (153 ms): Run: docker volume ls -q
[2023-09-06T15:48:10.351Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\steve\esp\Embeded --filter label=vsch.quality=stable
[2023-09-06T15:48:10.505Z] Stop (154 ms): Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\steve\esp\Embeded --filter label=vsch.quality=stable
[2023-09-06T15:48:10.505Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded --filter label=devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json
[2023-09-06T15:48:10.659Z] Stop (154 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded --filter label=devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json
[2023-09-06T15:48:10.659Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded
[2023-09-06T15:48:10.817Z] Stop (158 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded
[2023-09-06T15:48:10.818Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded
[2023-09-06T15:48:10.954Z] Stop (136 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded
[2023-09-06T15:48:10.954Z] Start: Run: C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js read-configuration --workspace-folder c:\Users\steve\esp\Embeded --id-label devcontainer.local_folder=c:\Users\steve\esp\Embeded --id-label devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --mount-workspace-git-root true
[2023-09-06T15:48:11.224Z] @devcontainers/cli 0.50.0. Node.js v16.17.1. win32 10.0.22621 x64.
[2023-09-06T15:48:11.224Z] Start: Run: git rev-parse --show-cdup
[2023-09-06T15:48:11.300Z] Stop (76 ms): Run: git rev-parse --show-cdup
[2023-09-06T15:48:11.301Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded --filter label=devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json
[2023-09-06T15:48:11.456Z] Stop (155 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded --filter label=devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json
[2023-09-06T15:48:11.466Z] Stop (512 ms): Run: C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js read-configuration --workspace-folder c:\Users\steve\esp\Embeded --id-label devcontainer.local_folder=c:\Users\steve\esp\Embeded --id-label devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --mount-workspace-git-root true
[2023-09-06T15:48:11.467Z] Start: Run: C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\steve\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-5bd8d5a0-ce38-48a4-a6e5-1475db3d922a1694015288678 --workspace-folder c:\Users\steve\esp\Embeded --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\steve\esp\Embeded --id-label devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\wsl.localhost\Ubuntu\run\user\1000\wayland-0,target=/tmp/vscode-wayland-11c87064-f199-4c64-b84e-8f0b520189e7.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-09-06T15:48:11.743Z] @devcontainers/cli 0.50.0. Node.js v16.17.1. win32 10.0.22621 x64.
[2023-09-06T15:48:11.743Z] Start: Run: docker buildx version
[2023-09-06T15:48:11.891Z] Stop (148 ms): Run: docker buildx version
[2023-09-06T15:48:11.892Z]
[2023-09-06T15:48:11.892Z] docker: ‘buildx’ is not a docker command.
See ‘docker --help’
[2023-09-06T15:48:11.892Z] Exit code 1
[2023-09-06T15:48:11.892Z] Start: Resolving Remote
[2023-09-06T15:48:11.895Z] Start: Run: git rev-parse --show-cdup
[2023-09-06T15:48:11.946Z] Stop (51 ms): Run: git rev-parse --show-cdup
[2023-09-06T15:48:11.949Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded --filter label=devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json
[2023-09-06T15:48:12.098Z] Stop (149 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\steve\esp\Embeded --filter label=devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json
[2023-09-06T15:48:12.103Z] Start: Run: docker inspect --type image Microsoft Artifact Registry
[2023-09-06T15:48:12.266Z] Stop (163 ms): Run: docker inspect --type image Microsoft Artifact Registry
[2023-09-06T15:48:12.267Z] local container features stored at: c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\node_modules\vscode-dev-containers\container-features
[2023-09-06T15:48:12.268Z] Start: Run: tar --no-same-owner -x -f -
[2023-09-06T15:48:12.295Z] Stop (27 ms): Run: tar --no-same-owner -x -f -
[2023-09-06T15:48:12.297Z] Start: Run: docker build -f R:\Temp\devcontainercli\container-features\0.50.0-1694015292266\Dockerfile-with-features -t vsc-embeded-f9ddce67c0f08868332f3c79a91e0b4295e02aae2961810a7d28e3713cb3ed73 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=builder-install c:\Users\steve\esp\Embeded
[2023-09-06T15:48:12.482Z]
[2023-09-06T15:48:12.525Z] DEPRECATED: The legacy builder is deprecated and will be removed in a future rel
ease.
Install the buildx component to build images with BuildKit:
[2023-09-06T15:48:12.556Z] unable to prepare context: unable to get relative Dockerfile path: Rel: can’t ma
ke R:\Temp\devcontainercli\container-features\0.50.0-1694015292266\Dockerfile-wi
th-features relative to C:\Users\steve\esp\Embeded
[2023-09-06T15:48:12.617Z] Stop (320 ms): Run: docker build -f R:\Temp\devcontainercli\container-features\0.50.0-1694015292266\Dockerfile-with-features -t vsc-embeded-f9ddce67c0f08868332f3c79a91e0b4295e02aae2961810a7d28e3713cb3ed73 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=builder-install c:\Users\steve\esp\Embeded
[2023-09-06T15:48:12.619Z] Error: Command failed: docker build -f R:\Temp\devcontainercli\container-features\0.50.0-1694015292266\Dockerfile-with-features -t vsc-embeded-f9ddce67c0f08868332f3c79a91e0b4295e02aae2961810a7d28e3713cb3ed73 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=builder-install c:\Users\steve\esp\Embeded
[2023-09-06T15:48:12.619Z] at IAA (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:463:1698)
[2023-09-06T15:48:12.620Z] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-09-06T15:48:12.620Z] at async qw (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:462:1691)
[2023-09-06T15:48:12.620Z] at async mK (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:462:610)
[2023-09-06T15:48:12.620Z] at async mAA (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:479:3660)
[2023-09-06T15:48:12.620Z] at async LC (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:479:4775)
[2023-09-06T15:48:12.620Z] at async jeA (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:611:12219)
[2023-09-06T15:48:12.620Z] at async _eA (c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js:611:11960)
[2023-09-06T15:48:12.632Z] Stop (1165 ms): Run: C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\steve\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-5bd8d5a0-ce38-48a4-a6e5-1475db3d922a1694015288678 --workspace-folder c:\Users\steve\esp\Embeded --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\steve\esp\Embeded --id-label devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\wsl.localhost\Ubuntu\run\user\1000\wayland-0,target=/tmp/vscode-wayland-11c87064-f199-4c64-b84e-8f0b520189e7.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-09-06T15:48:12.632Z] Exit code 1
[2023-09-06T15:48:12.635Z] Command failed: C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\steve.vscode\extensions\ms-vscode-remote.remote-containers-0.304.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\steve\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-5bd8d5a0-ce38-48a4-a6e5-1475db3d922a1694015288678 --workspace-folder c:\Users\steve\esp\Embeded --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\steve\esp\Embeded --id-label devcontainer.config_file=c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\steve\esp\Embeded.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\wsl.localhost\Ubuntu\run\user\1000\wayland-0,target=/tmp/vscode-wayland-11c87064-f199-4c64-b84e-8f0b520189e7.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-09-06T15:48:12.636Z] Exit code 1
——————————————