use targets for arch toolbox build to keep things in one containerfile
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 43m57s

This commit is contained in:
2025-03-09 15:08:02 -04:00
parent fb5ac88686
commit b9386f32b6
8 changed files with 115 additions and 95 deletions

View File

@@ -8,16 +8,23 @@ COMMAND_PREFIX=""
# docker context create podman --docker host=unix://$XDG_RUNTIME_DIR/podman/podman.sock
# docker context use podman
export DEBUG_TAG="debug-$(date +"%s")"
docker image pull docker.io/archlinux:latest
# Run the build for the CPU image
docker build \
-t gitea.reeseapps.com/services/arch-toolbox:latest \
-t gitea.reeseapps.com/services/arch-toolbox:$DEBUG_TAG \
-f ./infrastructure/graduated/distoolbox/arch-toolbox.containerfile \
--target cpu \
--load \
--no-cache \
./infrastructure/graduated/distoolbox
# Run the build for the AMD gpu image
docker build \
-t gitea.reeseapps.com/services/arch-toolbox-amdgpu:latest \
-f ./infrastructure/graduated/distoolbox/arch-amdgpu-toolbox.containerfile \
-t gitea.reeseapps.com/services/arch-toolbox-amdgpu:$DEBUG_TAG \
-f ./infrastructure/graduated/distoolbox/arch-toolbox.containerfile \
--target amdgpu \
--load \
./infrastructure/graduated/distoolbox