ArchiSteamFarm/Dockerfile.Service.x64

40 lines
2.1 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
2020-05-09 23:13:54 +00:00
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1
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
2020-05-04 22:14:36 +00:00
COPY resources resources
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 && \
2020-04-22 21:08:52 +00:00
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-x64 --nologo && \
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-x64 --nologo && \
dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-x64 --nologo && \
2020-04-22 20:27:59 +00:00
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o out -p:ASFVariant=linux-x64 -p:PublishTrimmed=true -r linux-x64 --nologo && \
cp "ArchiSteamFarm/overlay/linux-x64/ArchiSteamFarm-Service.sh" "out/ArchiSteamFarm-Service.sh"
2017-10-07 15:26:08 +00:00
2020-04-04 10:59:24 +00:00
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-buster-slim AS runtime
2018-09-24 16:01:16 +00:00
ENV ASPNETCORE_URLS=
2020-05-09 23:13:54 +00:00
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1
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 .
VOLUME ["/app/config", "/app/logs", "/app/plugins"]
2020-05-04 14:31:05 +00:00
HEALTHCHECK CMD ["pidof", "-q", "ArchiSteamFarm"]
2018-04-17 23:04:28 +00:00
ENTRYPOINT ["./ArchiSteamFarm-Service.sh", "--no-restart", "--process-required", "--system-required"]