devcontainers / devcontainers/features

Issues on the devcontainer feature repo with regards to the java feature.

Open
#721 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
1.5k
Forks
621
Avg merge
2d 11h
Merged PRs (30d)
4

Description

We are currently running internal training programs with a devcontainer which is defined here: https://github.com/MicrosoftLearning/Deploying-and-Running-Java-Applications-in-Azure-Spring-Apps/blob/master/.devcontainer/devcontainer.json

When we run this locally the devcontainer build fails for some people including me -

Error message-

0.490 Feature : Java (via SDKMAN!)
0.490 Description : Installs Java, SDKMAN! (if not installed), and needed depe
ndencies.
0.490 Id : ghcr.io/devcontainers/features/java
0.490 Version : 1.2.2
0.490 Documentation : https://github.com/devcontainers/features/tree/main/src/ja
va
0.490 Options :
0.490 VERSION="none"
0.490 JDKDISTRO="ms"
0.490 INSTALLGRADLE="false"
0.490 GRADLEVERSION="latest"
0.490 INSTALLMAVEN="true"
0.490 MAVENVERSION="latest"
0.490 INSTALLANT="false"
0.490 ANTVERSION="latest"
0.490 ==========================================================================
=
0.573 ./install.sh: line 189: mvn: command not found
7.703 ==== INTERNET NOT REACHABLE! =============================================
======
7.703
7.703 Some functionality is disabled or only partially available.
7.703 If this persists, please enable the offline mode:
7.703
7.703 $ sdk offline
7.703
7.703 ==========================================================================
======
7.704
7.708 This command is not available while offline.
7.711 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java)
failed to install! Look at the documentation at https://github.com/devcontainers
/features/tree/main/src/java for help troubleshooting this error.
------
Dockerfile.extended:53
--------------------
52 | ENV PATH="/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/cur
rent/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candi
dates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:${PATH}"
53 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,sour
ce=java_3,target=/tmp/build-features-src/java_3 \
54 | >>> cp -ar /tmp/build-features-src/java_3 /tmp/dev-container-features
\
55 | >>> && chmod -R 0755 /tmp/dev-container-features/java_3 \
56 | >>> && cd /tmp/dev-container-features/java_3 \
57 | >>> && chmod +x ./devcontainer-features-install.sh \
58 | >>> && ./devcontainer-features-install.sh \
59 | >>> && rm -rf /tmp/dev-container-features/java_3
60 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/java_
3 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/java
_3 && cd /tmp/dev-container-features/java_3 && chmod +x ./devcontainer-feature
s-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-containe
r-features/java_3" did not complete successfully: exit code: 1
[39408 ms] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=C:\Users\BBANER~1\AppData\Local\Temp\devcontainercli\container-features\0.51.1-1696363742376 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:1-17 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-deploying-and-running-java-applications-in-azure-spring-apps-dd2cc3c065f0ade8527e9a5839272865c57c3675095f24a4c92da6f312abbaf5-features -f C:\Users\BBANER~1\AppData\Local\Temp\devcontainercli\container-features\0.51.1-1696363742376\Dockerfile.extended c:\Users\bbanerjee\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
[39408 ms] at gAA (c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js:462:1066)
[39408 ms] at FK (c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js:462:1002)
[39409 ms] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[39409 ms] at async FAA (c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js:479:3660)
[39409 ms] at async GC (c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js:479:4775)
[39409 ms] at async VeA (c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js:611:12240)
[39409 ms] at async WeA (c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js:611:11981)
[39463 ms] Exit code 1
[39479 ms] Command failed: C:\Users\bbanerjee\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\bbanerjee\.vscode\extensions\ms-vscode-remote.remote-containers-0.309.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\bbanerjee\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-7b7a5fc9-2aa8-4e9c-9c8c-f8e2a62326331696363718937 --workspace-folder c:\Users\bbanerjee\source\repos\Deploying-and-Running-Java-Applications-in-Azure-Spring-Apps --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\bbanerjee\source\repos\Deploying-and-Running-Java-Applications-in-Azure-Spring-Apps --id-label devcontainer.config_file=c:\Users\bbanerjee\source\repos\Deploying-and-Running-Java-Applications-in-Azure-Spring-Apps\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\bbanerjee\source\repos\Deploying-and-Running-Java-Applications-in-Azure-Spring-Apps\.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
[39481 ms] Exit code 1

[dev_container_log_1003 (1).txt](https://github.com/devcontainers/features/files/12847988/dev_container_log_1003.1.txt)

Any help is appreciated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.