diff --git a/Dockerfile.arm64 b/Dockerfile similarity index 89% rename from Dockerfile.arm64 rename to Dockerfile index fa689750d..14872b2ec 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN echo "node: $(node --version)" && \ npm run deploy FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet +ARG BUILD_ARCH=x64 ARG STEAM_TOKEN_DUMPER_TOKEN ENV CONFIGURATION Release ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 @@ -24,13 +25,14 @@ RUN dotnet --info && \ 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 && \ if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"; fi && \ - dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" -p:SelfContained=false -p:UseAppHost=false -r linux-arm64 --nologo && \ - dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-arm64 --nologo && \ - dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/result" -p:ASFVariant=docker -p:SelfContained=false -p:UseAppHost=false -r linux-arm64 --nologo && \ + dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" -p:SelfContained=false -p:UseAppHost=false -r linux-$BUILD_ARCH --nologo && \ + dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-$BUILD_ARCH --nologo && \ + dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/result" -p:ASFVariant=docker -p:SelfContained=false -p:UseAppHost=false -r linux-$BUILD_ARCH --nologo && \ if [ -d "ArchiSteamFarm/overlay/generic" ]; then cp "ArchiSteamFarm/overlay/generic/"* "out/result"; fi && \ if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm64v8 AS runtime +ARG TAG_ARCH="" +FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim$TAG_ARCH AS runtime ENV ASPNETCORE_URLS= ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 diff --git a/Dockerfile.Service.arm64 b/Dockerfile.Service similarity index 82% rename from Dockerfile.Service.arm64 rename to Dockerfile.Service index 8b2ca4999..33b020a03 100644 --- a/Dockerfile.Service.arm64 +++ b/Dockerfile.Service @@ -7,6 +7,7 @@ RUN echo "node: $(node --version)" && \ npm run deploy FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet +ARG BUILD_ARCH=x64 ARG STEAM_TOKEN_DUMPER_TOKEN ENV CONFIGURATION Release ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 @@ -24,13 +25,14 @@ RUN dotnet --info && \ 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 && \ if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"; fi && \ - dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" -p:SelfContained=false -p:UseAppHost=false -r linux-arm64 --nologo && \ - dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-arm64 --nologo && \ - dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/result" -p:ASFVariant=linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-arm64 --nologo && \ - if [ -d "ArchiSteamFarm/overlay/linux-arm64" ]; then cp "ArchiSteamFarm/overlay/linux-arm64/"* "out/result"; fi && \ + dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" -p:SelfContained=false -p:UseAppHost=false -r linux-$BUILD_ARCH --nologo && \ + dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:SelfContained=false -p:UseAppHost=false -r linux-$BUILD_ARCH --nologo && \ + dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/result" -p:ASFVariant=linux-$BUILD_ARCH -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-$BUILD_ARCH --nologo && \ + if [ -d "ArchiSteamFarm/overlay/linux-$BUILD_ARCH" ]; then cp "ArchiSteamFarm/overlay/linux-$BUILD_ARCH/"* "out/result"; fi && \ if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-buster-slim-arm64v8 AS runtime +ARG TAG_ARCH="" +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-buster-slim$TAG_ARCH AS runtime ENV ASPNETCORE_URLS= ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 diff --git a/Dockerfile.Service.arm b/Dockerfile.Service.arm deleted file mode 100644 index 849de5568..000000000 --- a/Dockerfile.Service.arm +++ /dev/null @@ -1,43 +0,0 @@ -FROM node:lts AS build-node -WORKDIR /app -COPY ASF-ui . -RUN echo "node: $(node --version)" && \ - echo "npm: $(npm --version)" && \ - npm ci && \ - npm run deploy - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet -ARG STEAM_TOKEN_DUMPER_TOKEN -ENV CONFIGURATION Release -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -ENV NET_CORE_VERSION netcoreapp3.1 -ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -WORKDIR /app -COPY --from=build-node /app/dist ASF-ui/dist -COPY ArchiSteamFarm ArchiSteamFarm -COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -COPY resources resources -COPY Directory.Build.props Directory.Build.props -RUN dotnet --info && \ - # 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 && \ - if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"; fi && \ - dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${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/result" -p:ASFVariant=linux-arm -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-arm --nologo && \ - if [ -d "ArchiSteamFarm/overlay/linux-arm" ]; then cp "ArchiSteamFarm/overlay/linux-arm/"* "out/result"; fi && \ - if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi - -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-buster-slim-arm32v7 AS runtime -ENV ASPNETCORE_URLS= -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -LABEL maintainer="JustArchi " -EXPOSE 1242 -WORKDIR /app -COPY --from=build-dotnet /app/out/result . -VOLUME ["/app/config", "/app/logs", "/app/plugins"] -HEALTHCHECK CMD ["pidof", "-q", "ArchiSteamFarm"] -ENTRYPOINT ["./ArchiSteamFarm-Service.sh", "--no-restart", "--process-required", "--system-required"] diff --git a/Dockerfile.Service.x64 b/Dockerfile.Service.x64 deleted file mode 100644 index ab166dd68..000000000 --- a/Dockerfile.Service.x64 +++ /dev/null @@ -1,43 +0,0 @@ -FROM node:lts AS build-node -WORKDIR /app -COPY ASF-ui . -RUN echo "node: $(node --version)" && \ - echo "npm: $(npm --version)" && \ - npm ci && \ - npm run deploy - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet -ARG STEAM_TOKEN_DUMPER_TOKEN -ENV CONFIGURATION Release -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -ENV NET_CORE_VERSION netcoreapp3.1 -ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -WORKDIR /app -COPY --from=build-node /app/dist ASF-ui/dist -COPY ArchiSteamFarm ArchiSteamFarm -COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -COPY resources resources -COPY Directory.Build.props Directory.Build.props -RUN dotnet --info && \ - # 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 && \ - if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"; fi && \ - dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${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 && \ - dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/result" -p:ASFVariant=linux-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-x64 --nologo && \ - if [ -d "ArchiSteamFarm/overlay/linux-x64" ]; then cp "ArchiSteamFarm/overlay/linux-x64/"* "out/result"; fi && \ - if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi - -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-buster-slim AS runtime -ENV ASPNETCORE_URLS= -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -LABEL maintainer="JustArchi " -EXPOSE 1242 -WORKDIR /app -COPY --from=build-dotnet /app/out/result . -VOLUME ["/app/config", "/app/logs", "/app/plugins"] -HEALTHCHECK CMD ["pidof", "-q", "ArchiSteamFarm"] -ENTRYPOINT ["./ArchiSteamFarm-Service.sh", "--no-restart", "--process-required", "--system-required"] diff --git a/Dockerfile.arm b/Dockerfile.arm deleted file mode 100644 index f12fb65ec..000000000 --- a/Dockerfile.arm +++ /dev/null @@ -1,43 +0,0 @@ -FROM node:lts AS build-node -WORKDIR /app -COPY ASF-ui . -RUN echo "node: $(node --version)" && \ - echo "npm: $(npm --version)" && \ - npm ci && \ - npm run deploy - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet -ARG STEAM_TOKEN_DUMPER_TOKEN -ENV CONFIGURATION Release -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -ENV NET_CORE_VERSION netcoreapp3.1 -ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -WORKDIR /app -COPY --from=build-node /app/dist ASF-ui/dist -COPY ArchiSteamFarm ArchiSteamFarm -COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -COPY resources resources -COPY Directory.Build.props Directory.Build.props -RUN dotnet --info && \ - # 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 && \ - if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"; fi && \ - dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${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/result" -p:ASFVariant=docker -p:SelfContained=false -p:UseAppHost=false -r linux-arm --nologo && \ - if [ -d "ArchiSteamFarm/overlay/generic" ]; then cp "ArchiSteamFarm/overlay/generic/"* "out/result"; fi && \ - if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi - -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm32v7 AS runtime -ENV ASPNETCORE_URLS= -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -LABEL maintainer="JustArchi " -EXPOSE 1242 -WORKDIR /app -COPY --from=build-dotnet /app/out/result . -VOLUME ["/app/config", "/app/logs", "/app/plugins"] -HEALTHCHECK CMD ["pidof", "-q", "dotnet"] -ENTRYPOINT ["./ArchiSteamFarm.sh", "--no-restart", "--process-required", "--system-required"] diff --git a/Dockerfile.x64 b/Dockerfile.x64 deleted file mode 100644 index 51ee81b72..000000000 --- a/Dockerfile.x64 +++ /dev/null @@ -1,43 +0,0 @@ -FROM node:lts AS build-node -WORKDIR /app -COPY ASF-ui . -RUN echo "node: $(node --version)" && \ - echo "npm: $(npm --version)" && \ - npm ci && \ - npm run deploy - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-dotnet -ARG STEAM_TOKEN_DUMPER_TOKEN -ENV CONFIGURATION Release -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -ENV NET_CORE_VERSION netcoreapp3.1 -ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -WORKDIR /app -COPY --from=build-node /app/dist ASF-ui/dist -COPY ArchiSteamFarm ArchiSteamFarm -COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper -COPY resources resources -COPY Directory.Build.props Directory.Build.props -RUN dotnet --info && \ - # 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 && \ - if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then sed -i "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"; fi && \ - dotnet publish "${STEAM_TOKEN_DUMPER_NAME}" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${STEAM_TOKEN_DUMPER_NAME}/${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 && \ - dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/result" -p:ASFVariant=docker -p:SelfContained=false -p:UseAppHost=false -r linux-x64 --nologo && \ - if [ -d "ArchiSteamFarm/overlay/generic" ]; then cp "ArchiSteamFarm/overlay/generic/"* "out/result"; fi && \ - if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi - -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS runtime -ENV ASPNETCORE_URLS= -ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 -LABEL maintainer="JustArchi " -EXPOSE 1242 -WORKDIR /app -COPY --from=build-dotnet /app/out/result . -VOLUME ["/app/config", "/app/logs", "/app/plugins"] -HEALTHCHECK CMD ["pidof", "-q", "dotnet"] -ENTRYPOINT ["./ArchiSteamFarm.sh", "--no-restart", "--process-required", "--system-required"] diff --git a/hooks/build b/hooks/build new file mode 100644 index 000000000..291d03799 --- /dev/null +++ b/hooks/build @@ -0,0 +1,24 @@ +#!/bin/bash + +# no - in tag means we build amd64 +if [[ $DOCKER_TAG =~ "-" ]]; then + case ${DOCKER_TAG#*-} in + arm) + BUILD_ARCH=arm + TAG_ARCH="-arm32v7" + ;; + arm64) + BUILD_ARCH=arm64 + TAG_ARCH="-arm64v8" + ;; + esac +else + BUILD_ARCH=x64 + # needs to be blank cause dotnet images have no suffix for amd64 + TAG_ARCH= +fi + +docker build -f $DOCKERFILE_PATH -t $IMAGE_NAME . \ + --build-arg STEAM_TOKEN_DUMPER_TOKEN=$STEAM_TOKEN_DUMPER_TOKEN \ + --build-arg BUILD_ARCH=$BUILD_ARCH \ + --build-arg TAG_ARCH=$TAG_ARCH