Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #20 from Microsoft/clantz/jdk8
Browse files Browse the repository at this point in the history
Normalize Java definition names, disable git warning for JDK 12
  • Loading branch information
Chuxel committed Apr 25, 2019
2 parents 5d0cbb0 + a900427 commit e29d1c6
Show file tree
Hide file tree
Showing 22 changed files with 74 additions and 45 deletions.
17 changes: 9 additions & 8 deletions containers/azure-functions-java-8/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
12 changes: 9 additions & 3 deletions containers/java-11/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
2 changes: 1 addition & 1 deletion containers/java-11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|----------|-------|
Expand Down
10 changes: 7 additions & 3 deletions containers/java-12/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions containers/java-12/.devcontainer/settings.vscode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLegacyWarning": true
}
2 changes: 1 addition & 1 deletion containers/java-12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|----------|-------|
Expand Down
15 changes: 0 additions & 15 deletions containers/java-8-maven/.devcontainer/Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions containers/java-8-maven/.devcontainer/devcontainer.json

This file was deleted.

31 changes: 31 additions & 0 deletions containers/java-8/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions containers/java-8/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Java 8",
"dockerFile": "Dockerfile",
"extensions": [
"vscjava.vscode-java-pack"
]
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 |

Expand All @@ -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 <kbd>F1</kbd> 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.
Expand All @@ -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 <kbd>F1</kbd>, 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 <kbd>F5</kbd> 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.
Expand Down

0 comments on commit e29d1c6

Please sign in to comment.