forked from Azure/azure-functions-host
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (21 loc) · 906 Bytes
/
Dockerfile
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
FROM microsoft/dotnet:2.2-sdk AS installer-env
ENV PublishWithAspNetCoreTargetManifest false
COPY . /workingdir
RUN cd workingdir && \
dotnet build WebJobs.Script.sln && \
dotnet publish src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj --output /azure-functions-host
# Runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime
RUN apt-get update && \
apt-get install -y gnupg && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get update && \
apt-get install -y nodejs
COPY --from=installer-env ["/azure-functions-host", "/azure-functions-host"]
COPY --from=installer-env ["/workingdir/sample", "/home/site/wwwroot"]
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
HOME=/home \
ASPNETCORE_URLS=http://+:80 \
AZURE_FUNCTIONS_ENVIRONMENT=Development
EXPOSE 80
CMD dotnet /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost.dll