Skip to content

Commit 8182d58

Browse files
committed
Add a Dockerfile for building current HEAD
1 parent 0caea39 commit 8182d58

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM microsoft/dotnet:2.1-sdk AS installer-env
2+
3+
ENV PublishWithAspNetCoreTargetManifest false
4+
5+
COPY . /workingdir
6+
7+
RUN cd workingdir && \
8+
dotnet build WebJobs.Script.sln && \
9+
dotnet publish src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj --output /azure-functions-host
10+
11+
# Runtime image
12+
FROM microsoft/dotnet:2.1-aspnetcore-runtime
13+
14+
RUN apt-get update && \
15+
apt-get install -y gnupg && \
16+
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
17+
apt-get update && \
18+
apt-get install -y nodejs
19+
20+
COPY --from=installer-env ["/azure-functions-host", "/azure-functions-host"]
21+
COPY --from=installer-env ["/workingdir/sample", "/home/site/wwwroot"]
22+
23+
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
24+
ENV HOME=/home
25+
ENV ASPNETCORE_URLS=http://+:80
26+
EXPOSE 80
27+
28+
CMD dotnet /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost.dll

0 commit comments

Comments
 (0)