-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
36 lines (27 loc) · 1.73 KB
/
Copy pathDockerfile.base
File metadata and controls
36 lines (27 loc) · 1.73 KB
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
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-host
ENV PublishWithAspNetCoreTargetManifest=false
ENV HOST_VERSION=3.0.13113
ENV HOST_COMMIT=0cf47580569246787259ef2a29624cf9e8ce61b0
RUN BUILD_NUMBER=$(echo $HOST_VERSION | cut -d'.' -f 3) && \
wget https://github.com/Azure/azure-functions-host/archive/$HOST_COMMIT.tar.gz && \
tar xzf $HOST_COMMIT.tar.gz && \
cd azure-functions-host-* && \
dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj --output /azure-functions-host --runtime linux-x64 && \
mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 AS build-extensions
RUN apt-get update && \
apt-get install -y gnupg wget unzip && \
wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.1.1/Microsoft.Azure.Functions.ExtensionBundle.1.1.1.zip && \
mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.1.1 && \
unzip /Microsoft.Azure.Functions.ExtensionBundle.1.1.1.zip -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.1.1 && \
rm -f /Microsoft.Azure.Functions.ExtensionBundle.1.1.1.zip
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
HOME=/home \
FUNCTIONS_WORKER_RUNTIME=stucco-js \
DOTNET_USE_POLLING_FILE_WATCHER=true \
ASPNETCORE_URLS=http://*:80
EXPOSE 80
COPY --from=build-host [ "/azure-functions-host", "/azure-functions-host" ]
COPY --from=build-extensions [ "/FuncExtensionBundles", "/FuncExtensionBundles" ]
CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ]