-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 969 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (27 loc) · 969 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
32
33
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
MAINTAINER Matt ter Steege <matttersteege@gmail.com>
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENV DB_NAME=mysql-database
ENV DB_USER=root
ENV DB_PASSWORD=REDACTED_DATABASE_PASSWORD
ENV DB_HOST=REDACTED_IP_ADRESS
ENV DB_PORT=3306
ENV ZERMOS-WEB-VERSION=0.1.3
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Zermos-Web/Zermos-Web.csproj", "Zermos-Web/"]
COPY ["Infrastructure/Infrastructure.csproj", "Infrastructure/"]
RUN dotnet restore "Zermos-Web/Zermos-Web.csproj"
COPY . .
WORKDIR "/src/Zermos-Web"
RUN dotnet build "Zermos-Web.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Zermos-Web.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Zermos-Web.dll"]
VOLUME ["/dataprotection"]
#hit the [Zermos-Web/Dockerfile - orange pi] run button and all will be handled automatically