3 FROM --platform=$BUILDPLATFORM node:lts${IMAGESUFFIX} AS build-node
6 COPY .git/modules/ASF-ui /app/.git/modules/ASF-ui
8 echo "node: $(node --version)"; \
9 echo "npm: $(npm --version)"; \
10 npm ci --no-progress; \
11 npm run deploy --no-progress
13 FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0${IMAGESUFFIX} AS build-dotnet
14 ARG CONFIGURATION=Release
15 ARG STEAM_TOKEN_DUMPER_TOKEN
18 ENV DOTNET_CLI_TELEMETRY_OPTOUT true
19 ENV DOTNET_NOLOGO true
20 ENV PLUGINS_BUNDLED ArchiSteamFarm.OfficialPlugins.ItemsMatcher ArchiSteamFarm.OfficialPlugins.MobileAuthenticator ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
22 COPY --from=build-node /app/ASF-ui/dist ASF-ui/dist
23 COPY ArchiSteamFarm ArchiSteamFarm
24 COPY ArchiSteamFarm.OfficialPlugins.ItemsMatcher ArchiSteamFarm.OfficialPlugins.ItemsMatcher
25 COPY ArchiSteamFarm.OfficialPlugins.MobileAuthenticator ArchiSteamFarm.OfficialPlugins.MobileAuthenticator
26 COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
27 COPY resources resources
28 COPY .editorconfig .editorconfig
29 COPY Directory.Build.props Directory.Build.props
30 COPY Directory.Packages.props Directory.Packages.props
31 COPY LICENSE.txt LICENSE.txt
37 *) echo "ERROR: Unsupported OS: ${TARGETOS}"; exit 1 ;; \
40 case "$TARGETARCH" in \
41 "amd64") asf_variant="${TARGETOS}-x64" ;; \
42 "arm") asf_variant="${TARGETOS}-${TARGETARCH}" ;; \
43 "arm64") asf_variant="${TARGETOS}-${TARGETARCH}" ;; \
44 *) echo "ERROR: Unsupported CPU architecture: ${TARGETARCH}"; exit 1 ;; \
47 dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out" -p:ASFVariant=docker -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo --no-self-contained; \
49 if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs" ]; then \
50 sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs"; \
53 for plugin in $PLUGINS_BUNDLED; do \
54 dotnet publish "$plugin" -c "$CONFIGURATION" -o "out/plugins/$plugin" -p:ASFVariant=docker -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo; \
57 FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0${IMAGESUFFIX} AS runtime
61 ENV DOTNET_CLI_TELEMETRY_OPTOUT true
62 ENV DOTNET_NOLOGO true
64 LABEL maintainer="JustArchi <JustArchi@JustArchi.net>" \
65 org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
66 org.opencontainers.image.url="https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Docker" \
67 org.opencontainers.image.documentation="https://github.com/JustArchiNET/ArchiSteamFarm/wiki" \
68 org.opencontainers.image.source="https://github.com/JustArchiNET/ArchiSteamFarm" \
69 org.opencontainers.image.vendor="JustArchiNET" \
70 org.opencontainers.image.licenses="Apache-2.0" \
71 org.opencontainers.image.title="ArchiSteamFarm" \
72 org.opencontainers.image.description="C# application with primary purpose of idling Steam cards from multiple accounts simultaneously"
76 COPY --from=build-dotnet /app/out /asf
79 groupadd -r -g 1000 asf; \
80 useradd -r -d /app -g 1000 -u 1000 asf; \
82 chown -hR asf:asf /app /asf; \
83 ln -s /asf/ArchiSteamFarm.sh /usr/bin/ArchiSteamFarm
85 VOLUME ["/app/config", "/app/logs"]
86 HEALTHCHECK CMD ["pidof", "-q", "dotnet"]
87 ENTRYPOINT ["ArchiSteamFarm", "--no-restart", "--process-required", "--system-required"]