-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathpowershell70-composite.template
40 lines (31 loc) · 1.49 KB
/
powershell70-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
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
ARG HOST_VERSION
# Powershell worker requires 3.1 for now
COPY --from=mcr.microsoft.com/dotnet/core/aspnet:3.1 /usr/share/dotnet /usr/share/dotnet
# set runtime env variables
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
HOME=/home \
FUNCTIONS_WORKER_RUNTIME=powershell \
FUNCTIONS_WORKER_RUNTIME_VERSION=~7 \
DOTNET_USE_POLLING_FILE_WATCHER=true \
HOST_VERSION=${HOST_VERSION} \
ASPNETCORE_CONTENTROOT=/azure-functions-host \
ASPNETCORE_URLS=http://+:80
# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157
RUN apt-get update && \
apt-get install -y libc-dev
# copy bundles, host runtime and powershell worker from the build image
COPY --from=runtime-image [ "/usr/share/dotnet/shared", "/usr/share/dotnet/shared" ]
COPY --from=runtime-image ["/FuncExtensionBundles", "/FuncExtensionBundles"]
COPY --from=runtime-image ["/azure-functions-host", "/azure-functions-host"]
COPY --from=runtime-image ["/workers/powershell", "/azure-functions-host/workers/powershell"]
EXPOSE 2222 80
RUN apt-get update && \
apt-get install -y --no-install-recommends openssh-server dialog && \
echo "root:Docker!" | chpasswd
COPY sshd_config /etc/ssh/
COPY start.sh /azure-functions-host/
COPY install_ca_certificates.sh /opt/startup/
RUN chmod +x /azure-functions-host/start.sh && \
chmod +x /opt/startup/install_ca_certificates.sh
ENTRYPOINT ["/azure-functions-host/start.sh"]