Merge pull request #13 from mukaschultze/docker

Dockerfiles improvements
This commit is contained in:
Derek S 2021-04-07 18:26:24 -07:00 committed by GitHub
commit ed5608b41b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 15 deletions

View file

@ -1,16 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS builder
WORKDIR /lrm
WORKDIR /lrm-lb
COPY . .
RUN [\
"dotnet", "publish", \
"--output", "/build/", \
"--configuration", "Release",\
"--no-self-contained", \
"." ]
ARG BUILD_MODE="Release"
RUN dotnet publish \
--output /build/ \
--configuration $BUILD_MODE \
--no-self-contained .
FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine
WORKDIR /lrm-lb
COPY --from=builder /build/ .
ENV LRM_LB_CONFIG_PATH="/config/config-load-balancer.json"
CMD [ "./LRM_LoadBalancer" ]
ENTRYPOINT [ "./LRM_LoadBalancer" ]
ENTRYPOINT [ "./LRM_LoadBalancer"]

View file

@ -1,17 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS builder
WORKDIR /lrm
COPY . .
RUN [\
"dotnet", "publish", \
"--output", "/build/", \
"--configuration", "Release",\
"--no-self-contained", \
"." ]
ARG BUILD_MODE="Release"
RUN dotnet publish \
--output /build/ \
--configuration $BUILD_MODE \
--no-self-contained .
FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine
WORKDIR /lrm
COPY --from=builder /build/ .
COPY ./MultiCompiled.dll .
ENV LRM_CONFIG_PATH="/config/config.json"
CMD [ "./LRM" ]
ENTRYPOINT [ "./LRM" ]