-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (40 loc) · 1.55 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
### Build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app
COPY . ./
RUN dotnet publish \
--configuration Release \
-r linux-x64 \
-p:PublishSingleFile=true \
-p:PublishReadyToRun=true \
-p:SelfContained=true \
-p:DebugType=None \
-p:DebugSymbols=false \
-o ./artifacts \
MumbleApi
### Deploy
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
ARG BUILD_VERSION=unknown
ARG COMMIT_SHA=unknown
ENV BUILD_VERSION=${BUILD_VERSION} \
COMMIT_SHA=${COMMIT_SHA} \
DOTNET_RUNNING_IN_CONTAINER=true \
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
DOTNET_EnableDiagnostics=0 \
ASPNETCORE_ENVIRONMENT=Production \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
TZ=Europe/Zurich
LABEL org.opencontainers.image.source="https://github.com/smartive/cas-fee-adv-mumble-api" \
org.opencontainers.image.authors="[email protected]" \
org.opencontainers.image.url="https://github.com/smartive/cas-fee-adv-mumble-api" \
org.opencontainers.image.documentation="https://github.com/smartive/cas-fee-adv-mumble-api/blob/main/README.md" \
org.opencontainers.image.source="https://github.com/smartive/cas-fee-adv-mumble-api/blob/main/Dockerfile" \
org.opencontainers.image.version="${BUILD_VERSION}" \
org.opencontainers.image.revision="${COMMIT_SHA}" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.title="Mumble API" \
org.opencontainers.image.description="Demo API for Mumble. API that is used in the CAS FEE Advanced."
WORKDIR /app
COPY --from=build /app/artifacts .
CMD [ "/app/MumbleApi" ]