From 31c0e50e57e18f1a4f5bcef6814557841ff6f910 Mon Sep 17 00:00:00 2001 From: Tudor Timi Date: Sat, 2 Dec 2023 23:09:02 +0000 Subject: [PATCH 1/2] Add dev container This is what VS Code suggests for Java development. Using `bookworm` (i.e. Debian 12) doesn't work for some reason, so we're sticking with `bullseye` (i.e. Debian 11). We don't need Gradle installed in the container, as we're using the Grade wrapper. --- .devcontainer/devcontainer.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..15f8fcb --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,27 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/java +{ + "name": "Java", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/java:1-8-bullseye", + + "features": { + "ghcr.io/devcontainers/features/java:1": { + "version": "none", + "installMaven": "false", + "installGradle": "false" + } + } + + // 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" +} From 2a794fbccad85281f5dc9807e6d294ec8fb93755 Mon Sep 17 00:00:00 2001 From: Tudor Timi Date: Sat, 2 Dec 2023 23:13:31 +0000 Subject: [PATCH 2/2] Remove placeholder comments These aren't that useful. The link to the docs at the top of the file might be useful, though. --- .devcontainer/devcontainer.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 15f8fcb..77ac155 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,6 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/java { "name": "Java", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/java:1-8-bullseye", "features": { @@ -12,16 +11,4 @@ "installGradle": "false" } } - - // 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" }