|
1 | | -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
2 | | -// https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/java |
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
| 2 | +// README at: https://github.com/devcontainers/templates/tree/main/src/java |
3 | 3 | { |
4 | 4 | "name": "Java", |
5 | | - "build": { |
6 | | - "dockerfile": "Dockerfile", |
7 | | - "args": { |
8 | | - // Update the VARIANT arg to pick a Java version: 11, 16 |
9 | | - "VARIANT": "11", |
10 | | - // Options |
11 | | - "INSTALL_MAVEN": "false", |
12 | | - "INSTALL_GRADLE": "false", |
13 | | - "NODE_VERSION": "none" |
14 | | - } |
15 | | - }, |
| 5 | + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
| 6 | + "image": "mcr.microsoft.com/devcontainers/java:1-17-bookworm", |
16 | 7 |
|
17 | | - // Set *default* container specific settings.json values on container create. |
18 | | - "settings": { |
19 | | - "java.home": "/docker-java-home" |
| 8 | + "features": { |
| 9 | + "ghcr.io/devcontainers/features/java:1": { |
| 10 | + "version": "none", |
| 11 | + "installMaven": "false", |
| 12 | + "installGradle": "true" |
| 13 | + } |
20 | 14 | }, |
21 | | - |
22 | | - // Add the IDs of extensions you want installed when the container is created. |
23 | | - "extensions": [ |
24 | | - "redhat.java", |
25 | | - "ms-vscode.cpptools", |
26 | | - "vcjava.vscode-java-debug", |
27 | | - "ms-toolsai.jupyter", |
28 | | - "vcjava.vscode-java-dependency", |
29 | | - "wpilibsuite.vscode-wpilib" |
30 | | - ], |
31 | 15 |
|
32 | 16 | // Use 'forwardPorts' to make a list of ports inside the container available locally. |
33 | 17 | // "forwardPorts": [], |
34 | 18 |
|
35 | 19 | // Use 'postCreateCommand' to run commands after the container is created. |
36 | | - // "postCreateCommand": "java -version", |
| 20 | + // "postCreateCommand": "", |
| 21 | + |
| 22 | + // Configure tool-specific properties. |
| 23 | + "customizations": { |
| 24 | + "vscode": { |
| 25 | + "extensions": [ |
| 26 | + "redhat.java", |
| 27 | + "ms-vscode.cpptools", |
| 28 | + "vcjava.vscode-java-debug", |
| 29 | + "ms-toolsai.jupyter", |
| 30 | + "vcjava.vscode-java-dependency" |
| 31 | + ] |
| 32 | + } |
| 33 | + }, |
| 34 | + |
| 35 | + "postAttachCommand": "./.devcontainer/installWPILibExtension.sh && exit" |
37 | 36 |
|
38 | | - // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
39 | | - "remoteUser": "vscode" |
| 37 | + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 38 | + // "remoteUser": "root" |
40 | 39 | } |
0 commit comments