-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
31 lines (26 loc) · 883 Bytes
/
dockerfile
File metadata and controls
31 lines (26 loc) · 883 Bytes
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
# # Learn about building .NET container images:
# # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build
ARG TARGETARCH
RUN echo ${TARGETARCH}
# Get ApsimX dependencies.
WORKDIR /
RUN git clone https://github.com/APSIMInitiative/ApsimX.git
# COPY ../ApsimX /ApsimX
WORKDIR /ApsimX
RUN dotnet build
COPY . /apsimdocs
WORKDIR /apsimdocs
RUN dotnet publish APSIM.Docs.csproj -a amd64 -c Debug -o ../app
# Runtime stage
# FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble
FROM apsiminitiative/rsensitivity
RUN apt -yq update && \
apt install -y aspnetcore-runtime-8.0 && \
apt install -y dotnet-runtime-8.0
EXPOSE 8080
WORKDIR /
COPY --link --from=build /app /app
COPY --link --from=build /ApsimX /ApsimX
WORKDIR /app
ENTRYPOINT ["dotnet","APSIM.Docs.dll"]