add build mode argument to docerfile builds
This commit is contained in:
parent
d62a7d6e39
commit
07ee4313f4
2 changed files with 12 additions and 14 deletions
|
|
@ -1,12 +1,11 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue