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 && \
|
2020-02-09 21:05:20 +00:00
|
|
|
npm run deploy
|
2018-09-24 21:33:09 +00:00
|
|
|
|
2019-12-04 17:33:51 +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
|
2019-12-04 17:33:51 +00:00
|
|
|
ENV NET_CORE_VERSION netcoreapp3.1
|
2017-10-06 21:56:39 +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
|
2018-10-05 15:43:50 +00:00
|
|
|
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 && \
|
2020-04-22 21:05:30 +00:00
|
|
|
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-arm --nologo && \
|
|
|
|
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-arm --nologo && \
|
|
|
|
dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-arm --nologo && \
|
|
|
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o out -p:ASFVariant=docker -p:SelfContained=false -p:UseAppHost=false -r linux-arm --nologo && \
|
2019-09-26 18:28:25 +00:00
|
|
|
cp "ArchiSteamFarm/overlay/generic/ArchiSteamFarm.sh" "out/ArchiSteamFarm.sh"
|
2017-10-06 21:56:39 +00:00
|
|
|
|
2019-12-04 17:33:51 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm32v7 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-06 21:56:39 +00:00
|
|
|
WORKDIR /app
|
2019-09-26 18:28:25 +00:00
|
|
|
COPY --from=build-dotnet /app/out .
|
2020-05-04 14:02:35 +00:00
|
|
|
HEALTHCHECK CMD ["pidof", "-q", "ArchiSteamFarm"]
|
2018-04-17 23:04:28 +00:00
|
|
|
ENTRYPOINT ["./ArchiSteamFarm.sh", "--no-restart", "--process-required", "--system-required"]
|