Updates for 1.41
This commit is contained in:
		@@ -1,37 +1,61 @@
 | 
			
		||||
#-----------------------------------------------------------------------------------------
 | 
			
		||||
#-------------------------------------------------------------------------------------------------------------
 | 
			
		||||
# Copyright (c) Microsoft Corporation. All rights reserved.
 | 
			
		||||
# Licensed under the MIT License. See LICENSE in the project root for license information.
 | 
			
		||||
#-----------------------------------------------------------------------------------------
 | 
			
		||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
 | 
			
		||||
#-------------------------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
FROM maven:3.6-jdk-8
 | 
			
		||||
FROM mcr.microsoft.com/java/jdk:8u232-zulu-ubuntu
 | 
			
		||||
 | 
			
		||||
# Or your actual UID, GID on Linux if not the default 1000
 | 
			
		||||
# Avoid warnings by switching to noninteractive
 | 
			
		||||
ENV DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
 | 
			
		||||
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
 | 
			
		||||
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
 | 
			
		||||
# will be updated to match your local UID/GID (when using the dockerFile property).
 | 
			
		||||
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
 | 
			
		||||
ARG USERNAME=vscode
 | 
			
		||||
ARG USER_UID=1000
 | 
			
		||||
ARG USER_GID=$USER_UID
 | 
			
		||||
 | 
			
		||||
# Configure apt
 | 
			
		||||
ENV DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
# Maven settings
 | 
			
		||||
ARG MAVEN_VERSION=3.6.1
 | 
			
		||||
ARG MAVEN_SHA=b4880fb7a3d81edd190a029440cdf17f308621af68475a4fe976296e71ff4a4b546dd6d8a58aaafba334d309cc11e638c52808a4b0e818fc0fd544226d952544
 | 
			
		||||
ENV MAVEN_HOME=/usr/local/share/maven
 | 
			
		||||
COPY maven-settings.xml ${MAVEN_HOME}/ref/
 | 
			
		||||
 | 
			
		||||
# Configure apt and install packages
 | 
			
		||||
RUN apt-get update \
 | 
			
		||||
    && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
 | 
			
		||||
    #
 | 
			
		||||
    # Install git, process tools, lsb-release (common in install instructions for CLIs)
 | 
			
		||||
    && apt-get -y install git procps lsb-release \
 | 
			
		||||
    #
 | 
			
		||||
    # Allow for a consistant java home location for settings - image is changing over time
 | 
			
		||||
    && if [ ! -d "/docker-java-home" ]; then ln -s "${JAVA_HOME}" /docker-java-home; fi \
 | 
			
		||||
    # Verify git and needed tools are installed
 | 
			
		||||
    && apt-get -y install \
 | 
			
		||||
        git \
 | 
			
		||||
        iproute2 \
 | 
			
		||||
        procps \
 | 
			
		||||
        curl \
 | 
			
		||||
        apt-transport-https \
 | 
			
		||||
        gnupg2 \
 | 
			
		||||
        lsb-release \
 | 
			
		||||
    #
 | 
			
		||||
    # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
 | 
			
		||||
    && groupadd --gid $USER_GID $USERNAME \
 | 
			
		||||
    && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
 | 
			
		||||
    # [Optional] Add sudo support for non-root user
 | 
			
		||||
    && useradd -s /bin/bash --uid ${USER_UID} --gid ${USER_GID} -m $USERNAME \
 | 
			
		||||
    # [Optional] Add sudo support for the non-root user
 | 
			
		||||
    && apt-get install -y sudo \
 | 
			
		||||
    && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
 | 
			
		||||
    && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
 | 
			
		||||
    && chmod 0440 /etc/sudoers.d/$USERNAME \
 | 
			
		||||
    # 
 | 
			
		||||
    # Install Maven
 | 
			
		||||
    && mkdir -p ${MAVEN_HOME} ${MAVEN_HOME}/ref \
 | 
			
		||||
    && curl -fsSL -o /tmp/apache-maven.tar.gz https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
 | 
			
		||||
    && echo "${MAVEN_SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
 | 
			
		||||
    && tar -xzf /tmp/apache-maven.tar.gz -C ${MAVEN_HOME} --strip-components=1 \
 | 
			
		||||
    && rm -f /tmp/apache-maven.tar.gz \
 | 
			
		||||
    && ln -s ${MAVEN_HOME}/bin/mvn /usr/local/bin/mvn \
 | 
			
		||||
    #
 | 
			
		||||
    # Clean up
 | 
			
		||||
    && apt-get autoremove -y \
 | 
			
		||||
    && apt-get clean -y \
 | 
			
		||||
    && rm -rf /var/lib/apt/lists/*
 | 
			
		||||
 | 
			
		||||
ENV DEBIAN_FRONTEND=
 | 
			
		||||
# Switch back to dialog for any ad-hoc use of apt-get
 | 
			
		||||
ENV DEBIAN_FRONTEND=dialog
 | 
			
		||||
@@ -1,26 +1,27 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "Java Sample",
 | 
			
		||||
	"dockerFile": "Dockerfile",
 | 
			
		||||
	
 | 
			
		||||
	// Comment out the next line to run as root instead. Linux users, 
 | 
			
		||||
	// update Dockerfile with your user's UID/GID if not 1000.
 | 
			
		||||
	"runArgs": ["-u", "vscode"],
 | 
			
		||||
 | 
			
		||||
	// Use 'settings' to set *default* container specific settings.json values on container create. 
 | 
			
		||||
	// You can edit these settings after create using File > Preferences > Settings > Remote.
 | 
			
		||||
	"settings":{
 | 
			
		||||
		"java.home": "/docker-java-home",
 | 
			
		||||
		"terminal.integrated.shell.linux": "/bin/bash"
 | 
			
		||||
	"settings": { 
 | 
			
		||||
		"terminal.integrated.shell.linux": "/bin/bash",
 | 
			
		||||
		"java.home": "/usr/lib/jvm/zulu-8-azure-amd64"
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	// Uncomment the next line if you want to publish any ports.
 | 
			
		||||
	// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
 | 
			
		||||
	// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
 | 
			
		||||
	// "appPort": [],
 | 
			
		||||
 | 
			
		||||
	// Uncomment the next line to run commands after the container is created.
 | 
			
		||||
	// "postCreateCommand": "java -version",
 | 
			
		||||
 | 
			
		||||
	// Comment out the next line to run as root
 | 
			
		||||
	"remoteUser": "vscode",
 | 
			
		||||
 | 
			
		||||
	// Add the IDs of extensions you want installed when the container is created in the array below.
 | 
			
		||||
	"extensions": [
 | 
			
		||||
		"vscjava.vscode-java-pack",
 | 
			
		||||
		"redhat.vscode-xml"
 | 
			
		||||
		"ms-azuretools.vscode-azurefunctions",
 | 
			
		||||
		"vscjava.vscode-java-pack"
 | 
			
		||||
	]
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								.devcontainer/maven-settings.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.devcontainer/maven-settings.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
 | 
			
		||||
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
 | 
			
		||||
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
 | 
			
		||||
  <localRepository>/usr/share/maven/ref/repository</localRepository>
 | 
			
		||||
</settings>
 | 
			
		||||
		Reference in New Issue
	
	Block a user