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

Dev Container does not run #35

Open
OzBob opened this issue Dec 2, 2024 · 2 comments · May be fixed by #45
Open

Dev Container does not run #35

OzBob opened this issue Dec 2, 2024 · 2 comments · May be fixed by #45
Assignees

Comments

@OzBob
Copy link

OzBob commented Dec 2, 2024

This may be related to #28. Instructions in the top level readme to get the devcontainer running do not work on Windows 11 nor on a Github Codespaces linux machine (see below)

This issue is for a: (mark with an x)

- [X] bug report
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

clone repo. install docker desktop, vscode, and the "Remote - Containers" vscode extension renamed as "Dev Containers"
in vscode: F1: Dev Containers: Reopen in Container, the below log error

Any log messages given by the failure

after running the vscode command this log comes back:

**0.252 /usr/bin/env: ‘bash\r’: No such file or directory**
0.252 ERROR: **Feature "Azure AI Document Processing Samples Dev Tools" (Unknown)
failed to install!**
------
Dockerfile.extended:87
--------------------
  86 |
  87 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,sour
ce=dev-tools_7,target=/tmp/build-features-src/dev-tools_7 \
  88 | >>>     cp -ar /tmp/build-features-src/dev-tools_7 /tmp/dev-container-fea
tures \
  89 | >>>  && chmod -R 0755 /tmp/dev-container-features/dev-tools_7 \
  90 | >>>  && cd /tmp/dev-container-features/dev-tools_7 \
  91 | >>>  && chmod +x ./devcontainer-features-install.sh \
  92 | >>>  && ./devcontainer-features-install.sh \
  93 | >>>  && rm -rf /tmp/dev-container-features/dev-tools_7
  94 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/dev-t
ools_7 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features
/dev-tools_7  && cd /tmp/dev-container-features/dev-tools_7  && chmod +x ./devco
ntainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /t
mp/dev-container-features/dev-tools_7" did not complete successfully: exit code:
 127

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux
/kqj7shj8sa4gymjn9aqm0sw9t
[2024-12-02T07:14:22.032Z] Stop (4559 ms): Run: docker buildx build --load --build-context dev_containers_feature_content_source={***}\AppData\Local\Temp\devcontainercli\container-features\0.72.0-1733123642082 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/python:1-3.12-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f {***}\AppData\Local\Temp\devcontainercli\container-features\0.72.0-1733123642082\Dockerfile.extended -t vsc-azure-ai-document-processing-samples-47041b881a689bd070f25472a8f8e4a630e19cc6ad0dfa2d61f61fe663378b43-features {***}\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
[2024-12-02T07:14:22.033Z] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source={***}\AppData\Local\Temp\devcontainercli\container-features\0.72.0-1733123642082 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/python:1-3.12-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f {***}\AppData\Local\Temp\devcontainercli\container-features\0.72.0-1733123642082\Dockerfile.extended -t vsc-azure-ai-document-processing-samples-47041b881a689bd070f25472a8f8e4a630e19cc6ad0dfa2d61f61fe663378b43-features {***}\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
[2024-12-02T07:14:22.033Z]     at ytA ({***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:465:1260)
[2024-12-02T07:14:22.033Z]     at bH ({***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:465:1002)
[2024-12-02T07:14:22.033Z]     at async TtA ({***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:482:3848)
[2024-12-02T07:14:22.033Z]     at async iB ({***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:482:4963)
[2024-12-02T07:14:22.033Z]     at async wrA ({***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:663:203)
[2024-12-02T07:14:22.033Z]     at async DrA ({***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:662:14830)
[2024-12-02T07:14:22.033Z]     at async {***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js:482:1190
[2024-12-02T07:14:22.050Z] Stop (20567 ms): Run: {***}\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe {***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder {***}\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-7496b1f1-1c6a-4e9a-a774-8a3719c7f9671733123639729 --workspace-folder c:\s\OzBob\azure-ai-document-processing-samples --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=c:\s\OzBob\azure-ai-document-processing-samples --id-label devcontainer.config_file=c:\s\OzBob\azure-ai-document-processing-samples\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\s\OzBob\azure-ai-document-processing-samples\.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 --include-configuration --include-merged-configuration
[2024-12-02T07:14:22.050Z] Exit code 1
[2024-12-02T07:14:22.055Z] Command failed: {***}\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe {***}\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.392.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder {***}\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-7496b1f1-1c6a-4e9a-a774-8a3719c7f9671733123639729 --workspace-folder c:\s\OzBob\azure-ai-document-processing-samples --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=c:\s\OzBob\azure-ai-document-processing-samples --id-label devcontainer.config_file=c:\s\OzBob\azure-ai-document-processing-samples\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\s\OzBob\azure-ai-document-processing-samples\.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 --include-configuration --include-merged-configuration
[2024-12-02T07:14:22.055Z] Exit code 1

Maybe it is docker buildx build --load --build-context dev_containers_feature_content_source={***}\AppData\Local\Temp\devcontainercli\container-features\0.72.0-1733123642082 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/python:1-3.12-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg that fails?

Expected/desired behavior

dev container builds and can deploy to azure

OS and Version?

Windows 11

Versions

vscode(Preview), Docker for Windows(4.36.0), Dev Containers (0.392.0)

OS and Version

Linux on Github Codespaces
the powershell './Setup-Environment.ps1' at least starts creating resources, but then errors when it can not find a local .ENV file

  1. have to elevate permissions in root with: sudo chmod -R 777 .
  2. Error:
Select-String: /workspaces/azure-ai-document-processing-samples/Setup-Environment.ps1:27:9
Line |
  27 |      if (Select-String -Path $configurationFile -Pattern $variableName …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path '/workspaces/azure-ai-document-processing-samples/.env'
     | because it does not exist.
Select-String: /workspaces/azure-ai-document-processing-samples/Setup-Environment.ps1:27:9```
@jamesmcroft
Copy link
Member

Thanks for raising @OzBob. I've had similar comments recently and wonder if something has changed.

Let me prioritize this today and aim to resolve

@jamesmcroft jamesmcroft self-assigned this Dec 19, 2024
@jamesmcroft
Copy link
Member

@OzBob can you try the changes on the linked PR branch to see if you are still experiencing the same issues?

I've validated these with a colleague who was seeing a similar problem and verified this is now working for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants