diff --git a/containers/azure-functions-java-8/.devcontainer/Dockerfile b/containers/azure-functions-java-8/.devcontainer/Dockerfile index fe788d5424..671eebfbf0 100644 --- a/containers/azure-functions-java-8/.devcontainer/Dockerfile +++ b/containers/azure-functions-java-8/.devcontainer/Dockerfile @@ -10,6 +10,15 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get -y install --no-install-recommends apt-utils 2>&1 +# Verify git and needed tools are installed +RUN apt-get -y install \ + git \ + procps \ + curl \ + apt-transport-https \ + gnupg2 \ + lsb-release + # Install dotnet core sdk - See https://github.com/dotnet/dotnet-docker/blob/master/2.1/sdk/stretch/amd64/Dockerfile # Install .NET CLI dependencies RUN apt-get install -y --no-install-recommends \ @@ -45,14 +54,6 @@ ENV ASPNETCORE_URLS=http://+:80 \ # Trigger first run experience by running arbitrary cmd to populate local package cache RUN dotnet help &> /dev/null -# Verify git and needed tools are installed -RUN apt-get -y install \ - git \ - procps \ - curl \ - apt-transport-https \ - gnupg2 \ - lsb-release # Install Azure Functions and Azure CLI RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ diff --git a/containers/java-11/.devcontainer/Dockerfile b/containers/java-11/.devcontainer/Dockerfile index 3e8e3eea72..c3134d04e9 100644 --- a/containers/java-11/.devcontainer/Dockerfile +++ b/containers/java-11/.devcontainer/Dockerfile @@ -5,14 +5,19 @@ FROM maven:3-jdk-11 -# Install git, process tools -RUN apt-get update && apt-get -y install git procps curl +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + +# Verify git, needed tools installed +RUN apt-get -y install git procps curl # Install Gradle ENV GRADLE_HOME /opt/gradle ENV GRADLE_VERSION 5.4 ARG GRADLE_DOWNLOAD_SHA256=c8c17574245ecee9ed7fe4f6b593b696d1692d1adbfef425bef9b333e3a0e8de -RUN curl -SL --output gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ +RUN curl -sSL --output gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \ && unzip gradle.zip \ && rm gradle.zip \ @@ -23,3 +28,4 @@ RUN curl -SL --output gradle.zip "https://services.gradle.org/distributions/grad RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=dialog diff --git a/containers/java-11/README.md b/containers/java-11/README.md index 588b2ecae4..de4e8910a9 100644 --- a/containers/java-11/README.md +++ b/containers/java-11/README.md @@ -2,7 +2,7 @@ ## Summary -*Develop Java applications. Includes the JDK 11, Maven and Gradle build tools.* +*Develop Java 11 applications. Includes the JDK 11, Maven, and Gradle build tools.* | Metadata | Value | |----------|-------| diff --git a/containers/java-12/.devcontainer/Dockerfile b/containers/java-12/.devcontainer/Dockerfile index e37ad6a913..f773e24aab 100644 --- a/containers/java-12/.devcontainer/Dockerfile +++ b/containers/java-12/.devcontainer/Dockerfile @@ -5,14 +5,18 @@ FROM maven:3-jdk-12 -# Install git, process tools -RUN yum update -y && yum install -y git procps unzip +# Add a setting to disable the out of date git warning. Unfortunatley, openJDK +# Docker images use Oracle SE Linux which has an outdated version of git (<2.0). +COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json + +# Verify git, needed tools installed +RUN yum install -y git curl procps unzip # Install Gradle ENV GRADLE_HOME /opt/gradle ENV GRADLE_VERSION 5.4 ARG GRADLE_DOWNLOAD_SHA256=c8c17574245ecee9ed7fe4f6b593b696d1692d1adbfef425bef9b333e3a0e8de -RUN curl -SL --output gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ +RUN curl -sSL --output gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \ && unzip gradle.zip \ && rm gradle.zip \ diff --git a/containers/java-12/.devcontainer/settings.vscode.json b/containers/java-12/.devcontainer/settings.vscode.json new file mode 100644 index 0000000000..8bd85eec15 --- /dev/null +++ b/containers/java-12/.devcontainer/settings.vscode.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLegacyWarning": true +} \ No newline at end of file diff --git a/containers/java-12/README.md b/containers/java-12/README.md index 972f2f5287..136e5a5f97 100644 --- a/containers/java-12/README.md +++ b/containers/java-12/README.md @@ -2,7 +2,7 @@ ## Summary -*Develop Java applications. Includes the JDK 12, Maven and Gradle build tools.* +*Develop Java 12 applications. Includes JDK 12, Maven, and Gradle build tools.* | Metadata | Value | |----------|-------| diff --git a/containers/java-8-maven/.devcontainer/Dockerfile b/containers/java-8-maven/.devcontainer/Dockerfile deleted file mode 100644 index a47cb4d7e6..0000000000 --- a/containers/java-8-maven/.devcontainer/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See LICENSE in the project root for license information. -#----------------------------------------------------------------------------------------- - -FROM maven:3-jdk-8 - -# Install git, process tools -RUN apt-get update && apt-get -y install git procps - -# Clean up -RUN apt-get autoremove -y \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* - \ No newline at end of file diff --git a/containers/java-8-maven/.devcontainer/devcontainer.json b/containers/java-8-maven/.devcontainer/devcontainer.json deleted file mode 100644 index 987d123896..0000000000 --- a/containers/java-8-maven/.devcontainer/devcontainer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Java 8 & Maven", - "dockerFile": "Dockerfile", - "extensions": [ - "vscjava.vscode-java-pack", - "redhat.vscode-xml" - ] -} diff --git a/containers/java-8/.devcontainer/Dockerfile b/containers/java-8/.devcontainer/Dockerfile new file mode 100644 index 0000000000..1da1e27b52 --- /dev/null +++ b/containers/java-8/.devcontainer/Dockerfile @@ -0,0 +1,31 @@ +#----------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root for license information. +#----------------------------------------------------------------------------------------- + +FROM maven:3-jdk-8 + +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + +# Verify git, needed tools installed +RUN apt-get -y install git procps curl + +# Install Gradle +ENV GRADLE_HOME /opt/gradle +ENV GRADLE_VERSION 5.4 +ARG GRADLE_DOWNLOAD_SHA256=c8c17574245ecee9ed7fe4f6b593b696d1692d1adbfef425bef9b333e3a0e8de +RUN curl -sSL --output gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ + && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \ + && unzip gradle.zip \ + && rm gradle.zip \ + && mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ + && ln -s "${GRADLE_HOME}/bin/gradlec" /usr/bin/gradle + +# Clean up +RUN apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=dialog diff --git a/containers/java-8/.devcontainer/devcontainer.json b/containers/java-8/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..44542b0942 --- /dev/null +++ b/containers/java-8/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "Java 8", + "dockerFile": "Dockerfile", + "extensions": [ + "vscjava.vscode-java-pack" + ] +} diff --git a/containers/java-8-maven/.npmignore b/containers/java-8/.npmignore similarity index 100% rename from containers/java-8-maven/.npmignore rename to containers/java-8/.npmignore diff --git a/containers/java-8-maven/.vscode/launch.json b/containers/java-8/.vscode/launch.json similarity index 100% rename from containers/java-8-maven/.vscode/launch.json rename to containers/java-8/.vscode/launch.json diff --git a/containers/java-8-maven/README.md b/containers/java-8/README.md similarity index 86% rename from containers/java-8-maven/README.md rename to containers/java-8/README.md index 925fd9aed7..7a322cd799 100644 --- a/containers/java-8-maven/README.md +++ b/containers/java-8/README.md @@ -1,12 +1,12 @@ -# Java 8 & Maven +# Java 8 ## Summary -*Develop Java 8 based applications. Includes the JDK, XML tools, along with any dependencies Maven requires.* +*Develop Java 8 applications. Includes JDK 8, Maven, and Gradle build tools.* | Metadata | Value | |----------|-------| -| *Contributors* | The VS Code Team | +| *Contributors* | The VS Code Java Team | | *Definition type* | Dockerfile | | *Languages, platforms* | Java, Maven | @@ -25,11 +25,11 @@ Beyond that, just follow these steps to use the definition: 2. To use VS Code's copy of this definition: 1. Start VS Code and open your project folder. 2. Press F1 select and **Remote-Containers: Create Container Configuration File...** from the command palette. - 3. Select the Java 8 & Maven definition. + 3. Select the Java 8 definition. 3. To use latest-and-greatest copy of this definition from the repository: 1. Clone this repository. - 2. Copy the contents of `containers/java-8-maven/.devcontainer` to the root of your project folder. + 2. Copy the contents of `containers/java-8/.devcontainer` to the root of your project folder. 3. Start VS Code and open your project folder. 4. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs. @@ -43,7 +43,7 @@ This definition includes some test code that will help you verify it is working 1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine. 2. Clone this repository. 3. Start VS Code, press F1, and select **Remote-Containers: Open Folder in Container...** -4. Select the `containers/java-8-maven` folder. +4. Select the `containers/java-8` folder. 5. After the folder has opened in the container, press F5 to start the project. 6. You should see "Hello Remote World!" in the a Debug Console after the program executes. 7. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing. diff --git a/containers/java-8-maven/test-project/.classpath b/containers/java-8/test-project/.classpath similarity index 100% rename from containers/java-8-maven/test-project/.classpath rename to containers/java-8/test-project/.classpath diff --git a/containers/java-8-maven/test-project/.gitignore b/containers/java-8/test-project/.gitignore similarity index 100% rename from containers/java-8-maven/test-project/.gitignore rename to containers/java-8/test-project/.gitignore diff --git a/containers/java-8-maven/test-project/.project b/containers/java-8/test-project/.project similarity index 100% rename from containers/java-8-maven/test-project/.project rename to containers/java-8/test-project/.project diff --git a/containers/java-8-maven/test-project/.settings/org.eclipse.jdt.apt.core.prefs b/containers/java-8/test-project/.settings/org.eclipse.jdt.apt.core.prefs similarity index 100% rename from containers/java-8-maven/test-project/.settings/org.eclipse.jdt.apt.core.prefs rename to containers/java-8/test-project/.settings/org.eclipse.jdt.apt.core.prefs diff --git a/containers/java-8-maven/test-project/.settings/org.eclipse.jdt.core.prefs b/containers/java-8/test-project/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from containers/java-8-maven/test-project/.settings/org.eclipse.jdt.core.prefs rename to containers/java-8/test-project/.settings/org.eclipse.jdt.core.prefs diff --git a/containers/java-8-maven/test-project/.settings/org.eclipse.m2e.core.prefs b/containers/java-8/test-project/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from containers/java-8-maven/test-project/.settings/org.eclipse.m2e.core.prefs rename to containers/java-8/test-project/.settings/org.eclipse.m2e.core.prefs diff --git a/containers/java-8-maven/test-project/pom.xml b/containers/java-8/test-project/pom.xml similarity index 100% rename from containers/java-8-maven/test-project/pom.xml rename to containers/java-8/test-project/pom.xml diff --git a/containers/java-8-maven/test-project/src/main/java/com/mycompany/app/App.java b/containers/java-8/test-project/src/main/java/com/mycompany/app/App.java similarity index 100% rename from containers/java-8-maven/test-project/src/main/java/com/mycompany/app/App.java rename to containers/java-8/test-project/src/main/java/com/mycompany/app/App.java diff --git a/containers/java-8-maven/test-project/src/test/java/com/mycompany/app/AppTest.java b/containers/java-8/test-project/src/test/java/com/mycompany/app/AppTest.java similarity index 100% rename from containers/java-8-maven/test-project/src/test/java/com/mycompany/app/AppTest.java rename to containers/java-8/test-project/src/test/java/com/mycompany/app/AppTest.java