From a48cfe1a1b13eccefd11c6f1224b0161aba8c11e Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Tue, 27 Jun 2023 10:48:37 -0400 Subject: [PATCH 1/8] Create Dockerfile --- .devcontainer/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..351a829d4c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +FROM mcr.microsoft.com/devcontainers/anaconda:0-3 + +# Copy environment.yml (if found) to a temp location so we update the environment. Also +# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. +COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ +RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ + && rm -rf /tmp/conda-tmp + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends From c71166d216b5ed61b50b41093aa3f9361f8978b6 Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Tue, 27 Jun 2023 10:49:15 -0400 Subject: [PATCH 2/8] Create devcontainer.json --- .devcontainer/devcontainer.json | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..704ca048c2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,55 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda +{ + "name": "Anaconda (Python 3)", + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/java:1": { + "version": "11", + "jdkDistro": "ms", + "gradleVersion": "latest", + "mavenVersion": "latest", + "antVersion": "latest" + }, + "ghcr.io/devcontainers-contrib/features/sbt-sdkman:2": { + "version": "latest", + "jdkVersion": "11", + "jdkDistro": "ms" + }, + "ghcr.io/devcontainers-contrib/features/scala-sdkman:2": { + "version": "latest", + "jdkVersion": "11", + "jdkDistro": "ms" + } + }, + "updateContentCommand": "sbt setup", + "customizations": { + "vscode": { + "extensions": [ + "ms-azuretools.vscode-docker", + "scala-lang.scala", + "vscjava.vscode-java-pack", + "vscjava.vscode-java-test", + "vscjava.vscode-java-debug" + ] + } + } + + // 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": "python --version", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From 3dbfd4234be1a7e5f24a73244330d1b7c8f31338 Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Tue, 27 Jun 2023 10:49:31 -0400 Subject: [PATCH 3/8] Create noop.txt --- .devcontainer/noop.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .devcontainer/noop.txt diff --git a/.devcontainer/noop.txt b/.devcontainer/noop.txt new file mode 100644 index 0000000000..09c5ae9b86 --- /dev/null +++ b/.devcontainer/noop.txt @@ -0,0 +1,3 @@ +This file copied into the container along with environment.yml* from the parent +folder. This file is included to prevents the Dockerfile COPY instruction from +failing if no environment.yml is found. From 092f49fb9cd0adf7134cc348a2f7ffaf225031d1 Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Wed, 9 Aug 2023 17:58:49 -0400 Subject: [PATCH 4/8] Update Dockerfile --- .devcontainer/Dockerfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 351a829d4c..d5d6a65991 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1 @@ -FROM mcr.microsoft.com/devcontainers/anaconda:0-3 - -# Copy environment.yml (if found) to a temp location so we update the environment. Also -# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. -COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ -RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ - && rm -rf /tmp/conda-tmp - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends +FROM mcr.microsoft.com/vscode/devcontainers/base:debian From 2574a389acde2eee6e5eebc6691d2d7ddffc18fd Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Wed, 9 Aug 2023 17:58:58 -0400 Subject: [PATCH 5/8] Update devcontainer.json --- .devcontainer/devcontainer.json | 53 ++++++++++++++------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 704ca048c2..55f35a2f0e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,55 +1,46 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda +// README at: https://github.com/devcontainers/templates/tree/main/src/java-postgres { - "name": "Anaconda (Python 3)", + "name": "Java & PostgreSQL", "build": { "context": "..", "dockerfile": "Dockerfile" }, + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", "features": { - "ghcr.io/devcontainers/features/java:1": { - "version": "11", - "jdkDistro": "ms", - "gradleVersion": "latest", - "mavenVersion": "latest", - "antVersion": "latest" - }, "ghcr.io/devcontainers-contrib/features/sbt-sdkman:2": { - "version": "latest", - "jdkVersion": "11", - "jdkDistro": "ms" + "jdkVersion": "11" }, "ghcr.io/devcontainers-contrib/features/scala-sdkman:2": { - "version": "latest", - "jdkVersion": "11", - "jdkDistro": "ms" - } + "jdkVersion": "11" + }, + "ghcr.io/devcontainers-contrib/features/scalacli-sdkman:2": { + "jdkVersion": "11" + }, + "ghcr.io/devcontainers/features/anaconda:1": {} }, - "updateContentCommand": "sbt setup", + // 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. + // This can be used to network with other containers or with the host. + // "forwardPorts": [ + // 51000, + // 51001, + // 51002 + // ], "customizations": { "vscode": { "extensions": [ - "ms-azuretools.vscode-docker", + "scalameta.metals", "scala-lang.scala", - "vscjava.vscode-java-pack", - "vscjava.vscode-java-test", - "vscjava.vscode-java-debug" + "EditorConfig.EditorConfig" ] } } - - // 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": "python --version", - + // "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 ddf4707d2378123db40cee9720214eae95328e3e Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Wed, 9 Aug 2023 21:26:54 -0400 Subject: [PATCH 6/8] Update devcontainer.json --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 55f35a2f0e..fcb18287f3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,13 +9,13 @@ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", "features": { "ghcr.io/devcontainers-contrib/features/sbt-sdkman:2": { - "jdkVersion": "11" + "jdkVersion": "17" }, "ghcr.io/devcontainers-contrib/features/scala-sdkman:2": { - "jdkVersion": "11" + "jdkVersion": "17" }, "ghcr.io/devcontainers-contrib/features/scalacli-sdkman:2": { - "jdkVersion": "11" + "jdkVersion": "17" }, "ghcr.io/devcontainers/features/anaconda:1": {} }, From b42dee36527d3fe1a93eb14052714f846cae570e Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Wed, 9 Aug 2023 21:27:01 -0400 Subject: [PATCH 7/8] Delete noop.txt --- .devcontainer/noop.txt | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .devcontainer/noop.txt diff --git a/.devcontainer/noop.txt b/.devcontainer/noop.txt deleted file mode 100644 index 09c5ae9b86..0000000000 --- a/.devcontainer/noop.txt +++ /dev/null @@ -1,3 +0,0 @@ -This file copied into the container along with environment.yml* from the parent -folder. This file is included to prevents the Dockerfile COPY instruction from -failing if no environment.yml is found. From f40a2dc3894bd64721240deeafbb067a455abf0d Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Fri, 11 Aug 2023 13:43:05 -0400 Subject: [PATCH 8/8] Update devcontainer.json --- .devcontainer/devcontainer.json | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fcb18287f3..3dbf88b17c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -33,10 +33,28 @@ "extensions": [ "scalameta.metals", "scala-lang.scala", - "EditorConfig.EditorConfig" + "EditorConfig.EditorConfig", + "k--kato.intellij-idea-keybindings", + "editorconfig.editorconfig", + "github.vscode-pull-request-github", + "ms-azuretools.vscode-docker", + "ms-python.python", + "ms-python.vscode-pylance", + "ms-vsliveshare.vsliveshare", + "ryanluker.vscode-coverage-gutters", + "bungcip.better-toml", + "GitHub.copilot", + "GitHub.vscode-github-actions", + "ms-vscode.azurecli", + "ms-vscode.azure-account", + "zokugun.explicit-folding", + "MaxKless.git-squash-all", + "GitHub.copilot-labs", + "GitHub.codespaces" ] } - } + }, + "onCreateCommand": "sbt setup" // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "java -version", // Configure tool-specific properties.