-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 743 Bytes
/
Dockerfile
File metadata and controls
32 lines (26 loc) · 743 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
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS base
WORKDIR /app
EXPOSE 8000
RUN apk add --no-cache \
bash \
git \
icu-libs \
openssh-keygen \
openssh
RUN ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
FROM microsoft/dotnet:2.2-sdk-alpine AS build
WORKDIR /src
COPY [".", "SqlSCM/"]
RUN dotnet restore "SqlSCM/SqlSCM.csproj"
COPY . .
WORKDIR "/src/SqlSCM"
RUN dotnet build "SqlSCM.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "SqlSCM.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY ["SqlSCM.xml", "."]
COPY --from=publish /app .
RUN rm appsettings.json
ENTRYPOINT ["dotnet", "SqlSCM.dll"]