2024-12-01 19:52:47 +03:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:7d24e90a392e88eb56093e4eb325ff883ad609382a55d42f17fd557b997022ca AS build-env
|
2024-10-27 19:34:01 +03:00
|
|
|
WORKDIR /Octobot
|
|
|
|
|
|
|
|
# Copy everything
|
|
|
|
COPY . ./
|
|
|
|
# Load build argument with publish options
|
|
|
|
ARG PUBLISH_OPTIONS="-c Release"
|
|
|
|
# Build and publish a release
|
|
|
|
RUN dotnet publish ./TeamOctolings.Octobot $PUBLISH_OPTIONS -o out
|
|
|
|
|
|
|
|
# Build runtime image
|
2024-12-01 19:52:47 +03:00
|
|
|
FROM mcr.microsoft.com/dotnet/runtime:9.0@sha256:1e5eb0ed94ca96a34a914456db80e48bd1bb7bc3e3c8eda5e2c3d89c153c3081
|
2024-10-27 19:34:01 +03:00
|
|
|
WORKDIR /Octobot
|
|
|
|
COPY --from=build-env /Octobot/out .
|
|
|
|
ENTRYPOINT ["./TeamOctolings.Octobot"]
|