2021-01-02 16:03:11 +00:00
|
|
|
ARG IMAGESUFFIX
|
|
|
|
|
|
|
|
FROM --platform=$BUILDPLATFORM node:lts${IMAGESUFFIX} AS build-node
|
2022-07-15 19:45:18 +00:00
|
|
|
WORKDIR /app/ASF-ui
|
2020-04-08 17:32:53 +00:00
|
|
|
COPY ASF-ui .
|
2022-07-15 19:45:18 +00:00
|
|
|
COPY .git/modules/ASF-ui /app/.git/modules/ASF-ui
|
2022-12-15 17:46:37 +00:00
|
|
|
RUN set -eu; \
|
|
|
|
echo "node: $(node --version)"; \
|
|
|
|
echo "npm: $(npm --version)"; \
|
|
|
|
npm ci --no-progress; \
|
2021-05-20 21:36:25 +00:00
|
|
|
npm run deploy --no-progress
|
2020-04-08 17:32:53 +00:00
|
|
|
|
2023-11-14 18:12:33 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0${IMAGESUFFIX} AS build-dotnet
|
2021-08-01 11:11:51 +00:00
|
|
|
ARG CONFIGURATION=Release
|
2020-06-13 15:05:26 +00:00
|
|
|
ARG STEAM_TOKEN_DUMPER_TOKEN
|
2021-01-02 13:49:03 +00:00
|
|
|
ARG TARGETARCH
|
|
|
|
ARG TARGETOS
|
2021-11-08 22:41:02 +00:00
|
|
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
|
|
|
|
ENV DOTNET_NOLOGO true
|
2023-02-09 23:37:26 +00:00
|
|
|
ENV PLUGINS ArchiSteamFarm.OfficialPlugins.ItemsMatcher ArchiSteamFarm.OfficialPlugins.MobileAuthenticator ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
2020-04-08 17:32:53 +00:00
|
|
|
WORKDIR /app
|
2022-07-15 19:45:18 +00:00
|
|
|
COPY --from=build-node /app/ASF-ui/dist ASF-ui/dist
|
2020-04-08 17:32:53 +00:00
|
|
|
COPY ArchiSteamFarm ArchiSteamFarm
|
2022-12-15 17:46:37 +00:00
|
|
|
COPY ArchiSteamFarm.OfficialPlugins.ItemsMatcher ArchiSteamFarm.OfficialPlugins.ItemsMatcher
|
2023-02-09 23:37:26 +00:00
|
|
|
COPY ArchiSteamFarm.OfficialPlugins.MobileAuthenticator ArchiSteamFarm.OfficialPlugins.MobileAuthenticator
|
2020-06-13 15:05:26 +00:00
|
|
|
COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
2020-05-04 22:14:36 +00:00
|
|
|
COPY resources resources
|
2021-05-06 15:20:47 +00:00
|
|
|
COPY .editorconfig .editorconfig
|
2020-05-24 09:03:44 +00:00
|
|
|
COPY Directory.Build.props Directory.Build.props
|
2021-05-02 12:56:30 +00:00
|
|
|
COPY Directory.Packages.props Directory.Packages.props
|
2022-03-16 15:41:08 +00:00
|
|
|
COPY LICENSE.txt LICENSE.txt
|
2022-12-15 17:46:37 +00:00
|
|
|
RUN set -eu; \
|
|
|
|
dotnet --info; \
|
|
|
|
\
|
2021-01-02 13:49:03 +00:00
|
|
|
case "$TARGETOS" in \
|
|
|
|
"linux") ;; \
|
|
|
|
*) echo "ERROR: Unsupported OS: ${TARGETOS}"; exit 1 ;; \
|
2022-12-15 17:46:37 +00:00
|
|
|
esac; \
|
|
|
|
\
|
2021-01-02 13:49:03 +00:00
|
|
|
case "$TARGETARCH" in \
|
|
|
|
"amd64") asf_variant="${TARGETOS}-x64" ;; \
|
|
|
|
"arm") asf_variant="${TARGETOS}-${TARGETARCH}" ;; \
|
|
|
|
"arm64") asf_variant="${TARGETOS}-${TARGETARCH}" ;; \
|
|
|
|
*) echo "ERROR: Unsupported CPU architecture: ${TARGETARCH}"; exit 1 ;; \
|
2022-12-15 17:46:37 +00:00
|
|
|
esac; \
|
|
|
|
\
|
2023-12-20 17:46:19 +00:00
|
|
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/result" -p:ASFVariant=docker -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo --no-self-contained; \
|
2022-12-15 17:46:37 +00:00
|
|
|
\
|
2022-12-19 21:50:25 +00:00
|
|
|
if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs" ]; then \
|
|
|
|
sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs"; \
|
2022-12-15 17:46:37 +00:00
|
|
|
fi; \
|
|
|
|
\
|
|
|
|
for plugin in $PLUGINS; do \
|
2023-12-20 17:46:19 +00:00
|
|
|
dotnet publish "$plugin" -c "$CONFIGURATION" -o "out/result/plugins/$plugin" -p:ASFVariant=docker -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo --no-self-contained; \
|
2022-12-15 17:46:37 +00:00
|
|
|
done
|
2020-04-08 17:32:53 +00:00
|
|
|
|
2023-11-14 18:12:33 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0${IMAGESUFFIX} AS runtime
|
2021-10-17 14:19:07 +00:00
|
|
|
ENV ASF_USER asf
|
2020-04-08 17:32:53 +00:00
|
|
|
ENV ASPNETCORE_URLS=
|
2021-11-08 22:41:02 +00:00
|
|
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
|
|
|
|
ENV DOTNET_NOLOGO true
|
2021-01-02 17:33:16 +00:00
|
|
|
|
|
|
|
LABEL maintainer="JustArchi <JustArchi@JustArchi.net>" \
|
|
|
|
org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
|
|
|
|
org.opencontainers.image.url="https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Docker" \
|
|
|
|
org.opencontainers.image.documentation="https://github.com/JustArchiNET/ArchiSteamFarm/wiki" \
|
|
|
|
org.opencontainers.image.source="https://github.com/JustArchiNET/ArchiSteamFarm" \
|
|
|
|
org.opencontainers.image.vendor="JustArchiNET" \
|
|
|
|
org.opencontainers.image.licenses="Apache-2.0" \
|
|
|
|
org.opencontainers.image.title="ArchiSteamFarm" \
|
|
|
|
org.opencontainers.image.description="C# application with primary purpose of idling Steam cards from multiple accounts simultaneously"
|
|
|
|
|
2020-04-08 17:32:53 +00:00
|
|
|
EXPOSE 1242
|
|
|
|
WORKDIR /app
|
2020-06-13 15:05:26 +00:00
|
|
|
COPY --from=build-dotnet /app/out/result .
|
2021-10-17 14:19:07 +00:00
|
|
|
|
2022-12-15 17:46:37 +00:00
|
|
|
RUN set -eu; \
|
|
|
|
groupadd -r -g 1000 asf; \
|
|
|
|
useradd -r -d /app -g 1000 -u 1000 asf; \
|
2021-10-17 14:19:07 +00:00
|
|
|
chown -hR asf:asf /app
|
|
|
|
|
2020-06-13 23:51:50 +00:00
|
|
|
VOLUME ["/app/config", "/app/logs"]
|
2020-05-04 14:31:05 +00:00
|
|
|
HEALTHCHECK CMD ["pidof", "-q", "dotnet"]
|
2021-07-23 22:29:22 +00:00
|
|
|
ENTRYPOINT ["sh", "ArchiSteamFarm.sh", "--no-restart", "--process-required", "--system-required"]
|