Fix Docker Image building with Steam Token Dumper, unify different Arches into one Dockerfile (#1845)

* Pass STEAM_TOKEN_DUMPER_TOKEN as --build-arg

* Unify different ARCHs Dockerfiles
This commit is contained in:
Sandro
2020-06-14 01:17:08 +02:00
committed by GitHub
parent 6287bc85fe
commit 017b26986b
7 changed files with 37 additions and 181 deletions

24
hooks/build Normal file
View File

@@ -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