Simplify Docker build

- Remove unnecessary build command (implied in publish)
- Remove unnecessary solution arg
- Move arg to command
This commit is contained in:
Andrew Rabert 2018-12-16 00:40:07 -05:00
parent 336a4a2b8d
commit 23ed559bb0
1 changed files with 1 additions and 3 deletions

View File

@ -3,11 +3,9 @@ ARG DOTNET_VERSION=2
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
WORKDIR /repo
COPY . .
ARG CONFIGURATION=RELEASE
RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
&& dotnet clean \
&& dotnet build --configuration ${CONFIGURATION} $(pwd)/MediaBrowser.sln \
&& dotnet publish --configuration ${CONFIGURATION} $(pwd)/MediaBrowser.sln --output /jellyfin
&& dotnet publish --configuration release --output /jellyfin
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
COPY --from=builder /jellyfin /jellyfin