cs-codex-dist-tests/Tools/TestNetRewarder/docker/Dockerfile

27 lines
551 B
Docker
Raw Normal View History

2024-01-31 16:30:29 +00:00
# Variables
2024-03-31 19:18:48 +00:00
ARG BUILDER=mcr.microsoft.com/dotnet/sdk:7.0
ARG IMAGE=${BUILDER}
2024-01-31 16:30:29 +00:00
ARG APP_HOME=/app
2024-03-31 19:18:48 +00:00
# Build
FROM ${IMAGE} AS builder
2024-01-31 16:30:29 +00:00
ARG APP_HOME
WORKDIR ${APP_HOME}
COPY ./Tools/TestNetRewarder ./Tools/TestNetRewarder
COPY ./Framework ./Framework
COPY ./ProjectPlugins ./ProjectPlugins
2024-03-31 19:18:48 +00:00
RUN dotnet restore Tools/TestNetRewarder
RUN dotnet publish Tools/TestNetRewarder -c Release -o out
# Create
FROM ${IMAGE}
ARG APP_HOME
ENV APP_HOME=${APP_HOME}
WORKDIR ${APP_HOME}
COPY --from=builder ${APP_HOME}/out .
CMD dotnet ${APP_HOME}/TestNetRewarder.dll