Avoid explicit temp Dockerfile

This commit is contained in:
Gunter Labes 2022-06-04 02:25:02 +02:00
parent 763d9b2838
commit 810e1e105a
No known key found for this signature in database
GPG key ID: C0C7B971CC910216
2 changed files with 6 additions and 8 deletions

View file

@ -50,8 +50,6 @@ checkindent() {
}
EXIT_VAL=-1
# remove temp dockerfile so it doesn't get picked up by `git status`
rm utils/dockerbuilds/CI/Dockerfile-CI-${IMAGE}-master
if [ "$NLS" == "only" ]; then
export LANGUAGE=en_US.UTF-8

View file

@ -29,12 +29,12 @@ elif [ "$IMAGE" == "mingw" ]; then
cd mingwbuild
mv ./wesnoth*-win64.exe ~/wesnoth-$version-win64.exe
else
# create temp docker file to pull the pre-created images
echo FROM wesnoth/wesnoth:"$IMAGE"-"$BRANCH" > utils/dockerbuilds/CI/Dockerfile-CI-"$IMAGE"-"$BRANCH"
echo COPY ./ /home/wesnoth-CI/ >> utils/dockerbuilds/CI/Dockerfile-CI-"$IMAGE"-"$BRANCH"
echo WORKDIR /home/wesnoth-CI >> utils/dockerbuilds/CI/Dockerfile-CI-"$IMAGE"-"$BRANCH"
docker build -t wesnoth-repo:"$IMAGE"-"$BRANCH" -f utils/dockerbuilds/CI/Dockerfile-CI-"$IMAGE"-"$BRANCH" .
# pull the pre-created image
docker build -t wesnoth-repo:"$IMAGE"-"$BRANCH" -f - . <<-EOF
FROM wesnoth/wesnoth:$IMAGE-$BRANCH
COPY ./ /home/wesnoth-CI/
WORKDIR /home/wesnoth-CI
EOF
docker run --tty --cap-add=ALL --privileged \
--env BRANCH --env IMAGE --env NLS --env TOOL --env CC --env CXX \