-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (20 loc) · 829 Bytes
/
Copy pathDockerfile
File metadata and controls
24 lines (20 loc) · 829 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
#https://mcr.microsoft.com/en-us/artifact/mar/dotnet/sdk/tags
FROM mcr.microsoft.com/dotnet/sdk:9.0.101@sha256:3fcf6f1e809c0553f9feb222369f58749af314af6f063f389cbd2f913b4ad556 AS build-env
# Environment variables
ARG LUX_APP_DATA_DIR="/App/Data"
ENV LUX_APP_DATA_DIR=$LUX_APP_DATA_DIR
WORKDIR /App
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
# Create data directory
RUN mkdir -p ${LUX_APP_DATA_DIR}
# Build runtime image
#https://mcr.microsoft.com/en-us/artifact/mar/dotnet/runtime/tags
FROM mcr.microsoft.com/dotnet/runtime:9.0.0@sha256:4fb8b01c8a0d06ac36c664d6c55630a7d11c971fc6f8575ca15bf0de1c67b46d
WORKDIR /App
COPY --from=build-env /App/out .
ENTRYPOINT ["dotnet", "luxelot.dll", "--app-data-dir", "${LUX_APP_DATA_DIR}"]