11{
22 "name" : " Java" ,
3- "build" : {
4- "dockerfile" : " Dockerfile" ,
5- "args" : {
6- // Update the VARIANT arg to pick a Java version >= 17
7- "VARIANT" : " 17" ,
8- // Options to install Maven or Gradle
9- "INSTALL_MAVEN" : " true" ,
10- "MAVEN_VERSION" : " 3.6.3" ,
11- "MAVEN_DOWNLOAD_SHA" : " c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0" ,
12- "INSTALL_GRADLE" : " true" ,
13- "GRADLE_VERSION" : " 5.4.1" ,
14- "GRADLE_DOWNLOAD_SHA" : " 7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc" ,
15- "INSTALL_NODE" : " false" ,
16- "NODE_VERSION" : " lts/*"
17- }
18- },
19-
3+ "image" : " mcr.microsoft.com/devcontainers/java:17-bookworm" ,
204 // Set *default* container specific settings.json values on container create.
21- "settings" : {
5+ "settings" : {
226 "terminal.integrated.shell.linux" : " /bin/bash" ,
23- "java.home" : " /docker-java-home"
247 },
25-
268 // Add the IDs of extensions you want installed when the container is created.
279 "extensions" : [
2810 " vscjava.vscode-java-pack"
29- ]
30-
11+ ],
12+ "features" : {
13+ "ghcr.io/devcontainers/features/java:1" : {
14+ "version" : " none" ,
15+ "installGradle" : " true" ,
16+ "installMaven" : " true"
17+ },
18+ "ghcr.io/devcontainers/features/node:1" : {
19+ "version" : " latest"
20+ }
21+ }
3122 // Use 'forwardPorts' to make a list of ports inside the container available locally.
3223 // "forwardPorts": [],
33-
3424 // Use 'postCreateCommand' to run commands after the container is created.
3525 // "postCreateCommand": "java -version",
36-
3726 // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
3827 // "remoteUser": "vscode"
39- }
28+ }
0 commit comments