forked from APSIMInitiative/APSIM.PerformanceTests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
20 lines (16 loc) · 901 Bytes
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This dockerfile is used to build a docker image for the POStats website.
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
# Clone and build the website.
RUN git clone https://github.com/hol353/APSIM.PerformanceTests /APSIM.POStats
# Uncomment next line (and comment previous line) to use a local repo rather than clone remote.
#ADD . /APSIM.POStats
# Build POStats
RUN cd /APSIM.POStats && dotnet publish -c Release -f net6.0 -r linux-x64 --no-self-contained
# Actual container is based on dotnet/aspnet, and doesn't include build tools.
FROM mcr.microsoft.com/dotnet/aspnet:6.0
RUN mkdir -p /opt/APSIM.POStats
COPY --from=build /APSIM.POStats/APSIM.POStats.Portal/bin/Release/net6.0/linux-x64/publish/ /opt/APSIM.POStats/
ENV ASPNETCORE_ENVIRONMENT=Production
SHELL ["/bin/bash"]
WORKDIR "/opt/APSIM.POStats"
ENTRYPOINT ["dotnet", "/opt/APSIM.POStats/APSIM.POStats.Portal.dll"]