Closed baywet closed 1 year ago
Adding the following lines to devcontainer.json
fixed it for me.
"containerEnv": {
"GRADLE_USER_HOME": "/home/vscode/.gradle"
}
confirmed! Thanks for sharing this! Do you want to send out the PR or shall I? https://github.com/microsoft/vscode-dev-containers/tree/main/containers/java
(although after running gradle build, it created a $HOME
directory at the root of the repo)
@baywet sorry, I adjusted my answer before your anwsers to a fully-qualified path because of the issue you described.
Feel free to open PR.
authored #1632. The bug was subtle between user changed in the script and variables being interpreted too early thus yielding no value.
It took me a while to revert to this but now (1.73.1) if you go through the creation of the container experience again with the same arguments it'll give you this instead.
{
"name": "Java",
"image": "mcr.microsoft.com/devcontainers/java:17",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "true"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
}
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
(without a dockerfile) While it takes significantly longer to build, it also works from the get-go. Which means no changes are required to the base dockerfile anymore. Closing.
Steps to Reproduce:
The following error happens
Failed to load native library 'libnative-platform.so' for Linux amd64
Full configuration: