2023-12-15 12:07:52 +00:00
|
|
|
# Variables
|
2024-10-10 09:54:42 +00:00
|
|
|
ARG BUILDER=mcr.microsoft.com/dotnet/sdk:8.0
|
2024-04-01 08:05:17 +00:00
|
|
|
ARG IMAGE=${BUILDER}
|
2023-12-15 12:07:52 +00:00
|
|
|
ARG APP_HOME=/app
|
2023-10-18 09:01:24 +00:00
|
|
|
|
2024-04-01 08:05:17 +00:00
|
|
|
|
|
|
|
# Build
|
|
|
|
FROM ${IMAGE} AS builder
|
2023-12-15 12:07:52 +00:00
|
|
|
ARG APP_HOME
|
|
|
|
|
|
|
|
WORKDIR ${APP_HOME}
|
2023-10-18 09:01:24 +00:00
|
|
|
COPY ./Tools/BiblioTech ./Tools/BiblioTech
|
2023-10-18 11:48:15 +00:00
|
|
|
COPY ./Framework ./Framework
|
|
|
|
COPY ./ProjectPlugins ./ProjectPlugins
|
2024-04-01 08:05:17 +00:00
|
|
|
RUN dotnet restore Tools/BiblioTech
|
|
|
|
RUN dotnet publish Tools/BiblioTech -c Release -o out
|
2023-12-15 12:07:52 +00:00
|
|
|
|
2024-04-01 08:05:17 +00:00
|
|
|
|
|
|
|
# Create
|
|
|
|
FROM ${IMAGE}
|
|
|
|
ARG APP_HOME
|
|
|
|
ENV APP_HOME=${APP_HOME}
|
|
|
|
|
|
|
|
WORKDIR ${APP_HOME}
|
|
|
|
COPY --from=builder ${APP_HOME}/out .
|
|
|
|
CMD dotnet ${APP_HOME}/BiblioTech.dll
|