Dockerfiles: misc

This commit is contained in:
JustArchi
2018-11-24 15:12:36 +01:00
parent 321fc2f525
commit 049d9facba
4 changed files with 16 additions and 8 deletions

View File

@@ -7,14 +7,16 @@ RUN echo "node: $(node --version)" && \
npm run-script deploy
FROM microsoft/dotnet:2.1-sdk AS build-dotnet
ENV CONFIGURATION Release
ENV NET_CORE_VERSION netcoreapp2.1
WORKDIR /app
COPY --from=build-node /app/dist ASF-ui/dist
COPY ArchiSteamFarm ArchiSteamFarm
COPY ArchiSteamFarm.Tests ArchiSteamFarm.Tests
RUN dotnet --info && \
dotnet test ArchiSteamFarm.Tests -c Release -f "$NET_CORE_VERSION" -o out/test /nologo && \
dotnet publish ArchiSteamFarm -c Release -f "$NET_CORE_VERSION" -o out/publish /nologo /p:ASFVariant=docker /p:LinkDuringPublish=false && \
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo && \
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo && \
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/publish' /nologo /p:ASFVariant=docker /p:LinkDuringPublish=false && \
cp "ArchiSteamFarm/scripts/generic/ArchiSteamFarm.sh" "ArchiSteamFarm/out/publish/ArchiSteamFarm.sh"
FROM microsoft/dotnet:2.1-runtime-stretch-slim-arm32v7 AS runtime