-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (23 loc) · 848 Bytes
/
Dockerfile
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
34
35
36
37
38
# ---- dotnet build stage ----
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as build
ARG BUILDCONFIG=RELEASE
ARG VERSION=1.0.0
WORKDIR /build/
COPY ./Server/Server.csproj ./Server.csproj
RUN dotnet restore ./Server.csproj
COPY ./Server ./
RUN dotnet build -c ${BUILDCONFIG} -o out && dotnet publish ./Server.csproj -c ${BUILDCONFIG} -o out /p:Version=${VERSION}
# ---- final stage ----
FROM omvk97/dotnet-kerberos-auth
LABEL Maintainer="Oliver Marco van Komen"
RUN apt-get update && apt-get install -y sqlite3
RUN mkdir /database/
COPY ./Server/test.db /database/test.db
ENV DOTNET_PROGRAM_HOME=/opt/WundergroundServer
COPY --from=build /build/out ${DOTNET_PROGRAM_HOME}
# Copy necessary scripts + configuration
COPY scripts /tmp/
RUN chmod +x /tmp/*.sh && \
mv /tmp/* /usr/bin && \
rm -rf /tmp/*
CMD [ "docker-entrypoint.sh" ]