ArchiSteamFarm/Dockerfile.Service.x64

33 lines
1.7 KiB
Docker
Raw Normal View History

2019-04-27 09:37:13 +00:00
FROM node:lts AS build-node
2018-09-24 21:33:09 +00:00
WORKDIR /app
COPY ASF-ui .
2018-11-24 13:54:17 +00:00
RUN echo "node: $(node --version)" && \
2018-09-24 21:33:09 +00:00
echo "npm: $(npm --version)" && \
2018-11-24 13:54:17 +00:00
npm ci && \
npm run deploy
2018-09-24 21:33:09 +00:00
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet
2018-11-24 14:12:36 +00:00
ENV CONFIGURATION Release
ENV NET_CORE_VERSION netcoreapp3.1
2017-10-07 15:26:08 +00:00
WORKDIR /app
2018-09-24 21:33:09 +00:00
COPY --from=build-node /app/dist ASF-ui/dist
2018-08-12 01:05:42 +00:00
COPY ArchiSteamFarm ArchiSteamFarm
COPY ArchiSteamFarm.Tests ArchiSteamFarm.Tests
2018-02-05 03:54:48 +00:00
RUN dotnet --info && \
2019-05-28 22:49:33 +00:00
# TODO: Remove workaround for https://github.com/microsoft/msbuild/issues/3897 when it's no longer needed
if [ -f "ArchiSteamFarm/Localization/Strings.zh-CN.resx" ]; then ln -s "Strings.zh-CN.resx" "ArchiSteamFarm/Localization/Strings.zh-Hans.resx"; fi && \
if [ -f "ArchiSteamFarm/Localization/Strings.zh-TW.resx" ]; then ln -s "Strings.zh-TW.resx" "ArchiSteamFarm/Localization/Strings.zh-Hant.resx"; fi && \
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo && \
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo && \
dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo && \
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out' --nologo /p:ASFVariant=generic /p:UseAppHost=false && \
cp "ArchiSteamFarm/overlay/generic/ArchiSteamFarm-Service.sh" "out/ArchiSteamFarm-Service.sh"
2017-10-07 15:26:08 +00:00
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS runtime
2018-09-24 16:01:16 +00:00
ENV ASPNETCORE_URLS=
2017-10-14 04:59:22 +00:00
LABEL maintainer="JustArchi <JustArchi@JustArchi.net>"
EXPOSE 1242
2017-10-07 15:26:08 +00:00
WORKDIR /app
COPY --from=build-dotnet /app/out .
2018-04-17 23:04:28 +00:00
ENTRYPOINT ["./ArchiSteamFarm-Service.sh", "--no-restart", "--process-required", "--system-required"]