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

Commit b582232

Browse files
authored
Merge pull request #151 from microsoft/clantz/az-fun-java
Update base image for Azure Functions Java 8
2 parents 5d4be31 + a9907c1 commit b582232

File tree

53 files changed

+81
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+81
-65
lines changed

containers/azure-ansible/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ RUN apt-get update \
7373
&& rm -rf /var/lib/apt/lists/*
7474

7575
# Switch back to dialog for any ad-hoc use of apt-get
76-
ENV DEBIAN_FRONTEND=
76+
ENV DEBIAN_FRONTEND=dialog
7777

containers/azure-blockchain/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ RUN apt-get update \
5454
&& rm -rf /var/lib/apt/lists/*
5555

5656
# Switch back to dialog for any ad-hoc use of apt-get
57-
ENV DEBIAN_FRONTEND=
57+
ENV DEBIAN_FRONTEND=dialog

containers/azure-cli/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ RUN apt-get update \
4444
&& rm -rf /var/lib/apt/lists/*
4545

4646
# Switch back to dialog for any ad-hoc use of apt-get
47-
ENV DEBIAN_FRONTEND=
47+
ENV DEBIAN_FRONTEND=dialog

containers/azure-functions-dotnetcore-2.1/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ RUN apt-get update \
5151
&& rm -rf /var/lib/apt/lists/*
5252

5353
# Switch back to dialog for any ad-hoc use of apt-get
54-
ENV DEBIAN_FRONTEND=
54+
ENV DEBIAN_FRONTEND=dialog

containers/azure-functions-dotnetcore-2.2/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ RUN apt-get update \
5151
&& rm -rf /var/lib/apt/lists/*
5252

5353
# Switch back to dialog for any ad-hoc use of apt-get
54-
ENV DEBIAN_FRONTEND=
54+
ENV DEBIAN_FRONTEND=dialog

containers/azure-functions-java-8/.devcontainer/Dockerfile

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
FROM maven:3-jdk-8
6+
FROM mcr.microsoft.com/java/jdk:8u232-zulu-ubuntu
77

88
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
@@ -16,6 +16,12 @@ ARG USERNAME=vscode
1616
ARG USER_UID=1000
1717
ARG USER_GID=$USER_UID
1818

19+
# Maven settings
20+
ARG MAVEN_VERSION=3.6.1
21+
ARG MAVEN_SHA=b4880fb7a3d81edd190a029440cdf17f308621af68475a4fe976296e71ff4a4b546dd6d8a58aaafba334d309cc11e638c52808a4b0e818fc0fd544226d952544
22+
ENV MAVEN_HOME=/usr/local/share/maven
23+
COPY maven-settings.xml ${MAVEN_HOME}/ref/
24+
1925
# Configure apt and install packages
2026
RUN apt-get update \
2127
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
@@ -30,29 +36,33 @@ RUN apt-get update \
3036
gnupg2 \
3137
lsb-release \
3238
#
33-
# Install Azure Functions, .NET Core, and Azure CLI
34-
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
35-
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list \
36-
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
37-
&& apt-get update \
38-
&& apt-get install -y azure-cli dotnet-sdk-2.1 azure-functions-core-tools \
39-
#
40-
# Allow for a consistant java home location for settings - image is changing over time
41-
&& if [ ! -d "/docker-java-home" ]; then ln -s "${JAVA_HOME}" /docker-java-home; fi \
42-
#
4339
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
4440
&& groupadd --gid $USER_GID $USERNAME \
45-
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
41+
&& useradd -s /bin/bash --uid ${USER_UID} --gid ${USER_GID} -m $USERNAME \
4642
# [Optional] Add sudo support for the non-root user
4743
&& apt-get install -y sudo \
4844
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
4945
&& chmod 0440 /etc/sudoers.d/$USERNAME \
46+
#
47+
# Install Maven
48+
&& mkdir -p ${MAVEN_HOME} ${MAVEN_HOME}/ref \
49+
&& 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 \
50+
&& echo "${MAVEN_SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
51+
&& tar -xzf /tmp/apache-maven.tar.gz -C ${MAVEN_HOME} --strip-components=1 \
52+
&& rm -f /tmp/apache-maven.tar.gz \
53+
&& ln -s ${MAVEN_HOME}/bin/mvn /usr/local/bin/mvn \
54+
#
55+
# Install Azure Functions, .NET Core, and Azure CLI
56+
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
57+
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list \
58+
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
59+
&& apt-get update \
60+
&& apt-get install -y azure-cli dotnet-sdk-2.1 azure-functions-core-tools \
5061
#
5162
# Clean up
5263
&& apt-get autoremove -y \
5364
&& apt-get clean -y \
5465
&& rm -rf /var/lib/apt/lists/*
5566

56-
5767
# Switch back to dialog for any ad-hoc use of apt-get
58-
ENV DEBIAN_FRONTEND=
68+
ENV DEBIAN_FRONTEND=dialog

containers/azure-functions-java-8/.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// You can edit these settings after create using File > Preferences > Settings > Remote.
88
"settings": {
99
"terminal.integrated.shell.linux": "/bin/bash",
10-
"java.home": "/docker-java-home"
10+
"java.home": "/usr/lib/jvm/zulu-8-azure-amd64"
1111
},
1212

1313
// Uncomment the next line to run commands after the container is created.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
https://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<localRepository>/usr/share/maven/ref/repository</localRepository>
6+
</settings>

containers/azure-functions-node-10/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ RUN apt-get update \
5353
&& rm -rf /var/lib/apt/lists/*
5454

5555
# Switch back to dialog for any ad-hoc use of apt-get
56-
ENV DEBIAN_FRONTEND=
56+
ENV DEBIAN_FRONTEND=dialog

containers/azure-functions-node-8/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ RUN apt-get update \
5353
&& rm -rf /var/lib/apt/lists/*
5454

5555
# Switch back to dialog for any ad-hoc use of apt-get
56-
ENV DEBIAN_FRONTEND=
56+
ENV DEBIAN_FRONTEND=dialog

0 commit comments

Comments
 (0)