-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathjava8-composite.template
43 lines (37 loc) · 1.76 KB
/
java8-composite.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ARG JAVA_VERSION=8u392b08
ARG JDK_NAME=jdk8u392-b08
ARG JAVA_HOME=/usr/lib/jvm/adoptium-8-x64
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0
ARG HOST_VERSION
ARG JAVA_VERSION
ARG JDK_NAME
ARG JAVA_HOME
COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ]
COPY sshd_config /etc/ssh/
COPY start.sh /azure-functions-host/
COPY install_ca_certificates.sh /opt/startup/
COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ]
COPY --from=runtime-image [ "/usr/share/dotnet/shared", "/usr/share/dotnet/shared" ]
COPY --from=runtime-image [ "/workers/java", "/azure-functions-host/workers/java" ]
EXPOSE 2222 80
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
HOME=/home \
FUNCTIONS_WORKER_RUNTIME=java \
DOTNET_USE_POLLING_FILE_WATCHER=true \
HOST_VERSION=${HOST_VERSION} \
ASPNETCORE_CONTENTROOT=/azure-functions-host \
ASPNETCORE_URLS=http://+:80 \
JAVA_HOME=${JAVA_HOME}
# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157
RUN apt-get update && \
apt-get install -y libc-dev wget libfreetype6 fontconfig fonts-dejavu && \
wget https://github.com/adoptium/temurin8-binaries/releases/download/${JDK_NAME}/OpenJDK8U-jdk_x64_linux_hotspot_${JAVA_VERSION}.tar.gz && \
mkdir -p ${JAVA_HOME} && \
tar -xzf OpenJDK8U-jdk_x64_linux_hotspot_${JAVA_VERSION}.tar.gz -C ${JAVA_HOME} --strip-components=1 && \
rm -f OpenJDK8U-jdk_x64_linux_hotspot_${JAVA_VERSION}.tar.gz
RUN apt-get update && \
apt-get install -y --no-install-recommends openssh-server dialog && \
echo "root:Docker!" | chpasswd && \
chmod +x /azure-functions-host/start.sh && \
chmod +x /opt/startup/install_ca_certificates.sh
ENTRYPOINT ["/azure-functions-host/start.sh"]