Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a Dev Container: unable to prepare context: unable to evaluate symlinks in Dockerfile path #7303

Closed
jbcpollak opened this issue Oct 6, 2022 · 15 comments · Fixed by devcontainers/cli#250
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@jbcpollak
Copy link

This happens with Dev Containers extension 0.255.2 that was just released, reverting to 0.251.0 fixes the problem.

  • VSCode Version: 1.71.2
  • Local OS Version: 20.04
  • Remote OS Version: 20.04
  • Remote Extension/Connection Type: Containers
  • Logs:
[2022-10-06T21:41:08.823Z] Stop (1135 ms): Run: docker build -t dev_container_feature_content_temp -f /tmp/devcontainercli-jpollak/container-features/0.19.0-1665092467661/Dockerfile.buildContent /tmp/devcontainercli-jpollak/container-features/0.19.0-1665092467661
[2022-10-06T21:41:08.824Z] Docker Compose override file for building image:
version: '3'

services:
  dill:
    image: vsc-dill-103ee479de0f5df8a7a34e89f897c386
    build:
      dockerfile: /tmp/devcontainercli-jpollak/container-features/0.19.0-1665092467661/Dockerfile-with-features
      target: dev_containers_target_stage
      context: /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/empty-folder
      args:
        - BUILDKIT_INLINE_CACHE=1
        - _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label
        - _DEV_CONTAINERS_IMAGE_USER=dill
        - _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp

[2022-10-06T21:41:08.825Z] Start: Run: docker compose --project-name dill_devcontainer -f /home/jpollak/src/pickle/dill/.devcontainer/docker-compose.yaml -f /home/jpollak/src/pickle/dill/.devcontainer/docker-compose.gpu.yaml -f /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665092468824.yml build
[2022-10-06T21:41:08.870Z] 1 error occurred:
	* unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/empty-folder/tmp: no such file or directory


[2022-10-06T21:41:08.872Z] Stop (47 ms): Run: docker compose --project-name dill_devcontainer -f /home/jpollak/src/pickle/dill/.devcontainer/docker-compose.yaml -f /home/jpollak/src/pickle/dill/.devcontainer/docker-compose.gpu.yaml -f /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665092468824.yml build
[2022-10-06T21:41:08.874Z] Error: Command failed: docker compose --project-name dill_devcontainer -f /home/jpollak/src/pickle/dill/.devcontainer/docker-compose.yaml -f /home/jpollak/src/pickle/dill/.devcontainer/docker-compose.gpu.yaml -f /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665092468824.yml build
[2022-10-06T21:41:08.874Z]     at pd (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:259:426)
[2022-10-06T21:41:08.874Z]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-10-06T21:41:08.874Z]     at async ZF (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:259:2424)
[2022-10-06T21:41:08.875Z]     at async XF (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:241:2391)
[2022-10-06T21:41:08.875Z]     at async bD (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:303:2193)
[2022-10-06T21:41:08.875Z]     at async ys (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:303:3182)
[2022-10-06T21:41:08.875Z]     at async UL (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:423:10319)
[2022-10-06T21:41:08.875Z]     at async ML (/home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:423:10075)
[2022-10-06T21:41:08.877Z] Stop (1658 ms): Run: /snap/code/108/usr/share/code/code --ms-enable-electron-run-as-node /home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-compose-path docker compose --workspace-folder /home/jpollak/src/pickle/dill --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/jpollak/src/pickle/dill --log-level debug --log-format json --config /home/jpollak/src/pickle/dill/.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-10-06T21:41:08.878Z] Exit code 1
[2022-10-06T21:41:08.882Z] Command failed: /snap/code/108/usr/share/code/code --ms-enable-electron-run-as-node /home/jpollak/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/jpollak/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-compose-path docker compose --workspace-folder /home/jpollak/src/pickle/dill --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/jpollak/src/pickle/dill --log-level debug --log-format json --config /home/jpollak/src/pickle/dill/.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-10-06T21:41:08.882Z] Exit code 1

Steps to Reproduce:

  1. Rebuild Devcontainer

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

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Oct 6, 2022
@chrmarti
Copy link
Contributor

chrmarti commented Oct 7, 2022

Could you append the full log?

@chrmarti chrmarti self-assigned this Oct 7, 2022
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Oct 7, 2022
@CosmoFox
Copy link

CosmoFox commented Oct 7, 2022

Same problem with Dev Container 0.255.2
After revert to 0.251.0 fixed

@bschlottfeldt
Copy link

Had the same problem with Dev Container 0.255.2, but my error message was a bit different : Error response from daemon: unable to find user usernamehere: no matching entries in passwd file. After reverting to version 0.251.0 and deleting the containers in docker, rebuilding again worked.

@bschlottfeldt
Copy link

@chrmarti
Copy link
Contributor

@bschlottfeldt Could you append the Dockerfile at C:\Users\BSCHLO~1\AppData\Local\Temp\devcontainercli\container-features\0.19.0-1665388493184\Dockerfile-with-features? (If that is not there anymore, retry with 0.255.2 and look for the path of Dockerfile-with-features in the log.)

@bschlottfeldt
Copy link

Do you mean this @chrmarti ?
Dockerfile-with-features.txt

@chrmarti
Copy link
Contributor

The use of ENV for the USER is not captured yet in our code:

ENV USERNAME="vscode"
# ...
USER ${USERNAME}

As a workaround could you use a build arg:

ARG USERNAME="vscode"
ENV USERNAME="${USERNAME}"
# ...
USER ${USERNAME}

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Oct 11, 2022
@chrmarti chrmarti added this to the October 2022 milestone Oct 11, 2022
@jbcpollak
Copy link
Author

We built a workaround for this, but it appears this may be fixed with v0.255.3, can anyone else confirm?

@asami0
Copy link

asami0 commented Oct 13, 2022

We built a workaround for this, but it appears this may be fixed with v0.255.3, can anyone else confirm?

v0.255.3 still has this.

@KunalBurangi
Copy link

Same issue for me too with v0.255.3 ..
the workaround was to revert it to v 0.234.0

@Didjacome
Copy link

Didjacome commented Oct 20, 2022

I have the same problem

all test I tried to run Dev Container Azure Terraform (Community)

on the first attempt I used

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

Second attempt:

docker: 20.10.20
vscode: 1.72.2
dev container extension: 255.4
operating system: Microsoft Windows 10 Enterprise
version OS: 10.0.19044 N/A build 19044
wsl version: 2
WSL operating system: Ubuntu 22.04.1 LTS release.

third attempt:

docker: 20.10.17
vscode: 1.71.1
dev container extension: 255.4
operating system: Microsoft Windows 10 Enterprise
version OS: 10.0.19044 N/A build 19044
wsl version: 2
WSL operating system: Ubuntu 22.04.1 LTS release.

fourth attempt:

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 22.04.1 LTS release.

fifth attempt:

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

sixth attempt:

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

seventh attempt:

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

@Didjacome
Copy link

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 22.04.1 LTS release.

@chrmarti
Copy link
Contributor

This should be fixed in Dev Containers 0.262.0-pre-release. Could you give that a try and let me know if it indeed fixes this issue? Thanks!

@andreamah andreamah added the author-verification-requested Issues potentially verifiable by issue author label Oct 28, 2022
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest pre-release!

@jbcpollak, you can help us out by commenting /verified if things are now working as expected.

Happy Coding!

@aeschli aeschli added the verification-steps-needed Steps to verify are needed for verification label Oct 28, 2022
@rzhao271
Copy link

Considering #7303 (comment) and #7358 (comment), I'll mark this issue as verified for now.
Feel free to comment on the issue or create a new one if the problem still persists for you.

@rzhao271 rzhao271 removed the verification-steps-needed Steps to verify are needed for verification label Oct 28, 2022
@rzhao271 rzhao271 added verified Verification succeeded and removed author-verification-requested Issues potentially verifiable by issue author labels Oct 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.