From b076d49cee5fab9b3507d0c14fbbafd74f89aa1b Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Fri, 31 Jan 2025 00:11:52 +0000 Subject: [PATCH] Update devcontainer --- .devcontainer/Dockerfile | 32 ---------------- .devcontainer/devcontainer.json | 68 ++++++++++++++++----------------- 2 files changed, 32 insertions(+), 68 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 992c52ac2..000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/java-8/.devcontainer/base.Dockerfile - -# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye -ARG VARIANT="bullseye" -FROM mcr.microsoft.com/vscode/devcontainers/java:0-8-${VARIANT} - -# [Option] Install Maven -ARG INSTALL_MAVEN="false" -ARG MAVEN_VERSION="" -# [Option] Install Grails -ARG INSTALL_GRAILS="true" -ARG GRAILS_VERSION="2.5.5" -# [Option] Install Gradle -ARG INSTALL_GRADLE="true" -ARG GRADLE_VERSION="2.11" -# [Option] Install Groovy -ARG INSTALL_GROOVY="true" -RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \ - && if [ "${INSTALL_GRAILS}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install grails \"${GRAILS_VERSION}\""; fi \ - && if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi \ - && if [ "${INSTALL_GROOVY}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install groovy"; fi - -# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 -ARG NODE_VERSION="12" -RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment this line to install global node packages. -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 664bdae63..a75e085fa 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,46 +1,42 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/java-8 +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu { - "name": "Java 8", - "build": { - "dockerfile": "Dockerfile", - "args": { - // Use the VARIANT arg to pick a Debian OS version: buster, bullseye - // Use bullseye when running on local arm64/Apple Silicon. - "VARIANT": "bullseye", - // Options - "INSTALL_MAVEN": "false", - "INSTALL_GRADLE": "true", - "NODE_VERSION": "12" + "name": "Apollo", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "ghcr.io/devcontainers-extra/features/gradle-sdkman:2": { + "version": "2.11", + "jdkVersion": "8", + "jdkDistro": "tem" + }, + "ghcr.io/devcontainers-extra/features/grails-sdkman:2": { + "version": "2.5.5", + "jdkVersion": "8", + "jdkDistro": "tem" + }, + "ghcr.io/devcontainers-extra/features/groovy-sdkman:2": { + "version": "latest", + "jdkVersion": "8", + "jdkDistro": "tem" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "12" } - }, - - // Set *default* container specific settings.json values on container create. - "settings": { - "java.jdt.java.ls.home": "/docker-java-home", - "java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current", - "java.configuration.runtimes": [{ - "default": true, - "name": "JavaSE-1.8", - "path": "/usr/local/sdkman/candidates/java/current" - }] - }, + } - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "vscjava.vscode-java-pack" - ], + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, // 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": "pipx install apollo", + // "postCreateCommand": "uname -a", - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode", - "features": { - "git": "os-provided", - "python": "os-provided" - } + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" }