diff --git a/Dockerfile b/Dockerfile index eb9e87cd826f3cfbb4a102e0f3ff8af0090bce9a..781a421315687e7f56c31e52177bdfec661f5393 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ # ---- Stage 0 ---- # Builds media repo binaries FROM golang:1.20-alpine AS builder -LABEL io.t2bot.mmr.cleanup="true" # Install build dependencies RUN apk add --no-cache git musl-dev dos2unix build-base @@ -11,6 +10,9 @@ COPY . /opt RUN dos2unix ./build.sh ./docker/run.sh && chmod 744 ./build.sh RUN ./build.sh +# the label is applied last so we don't pollute the image list with a weird amount of labelled images +LABEL io.t2bot.mmr.cleanup="true" + # ---- Stage 1 ---- # Final runtime stage. FROM alpine diff --git a/test/test_internals/deps_mmr.go b/test/test_internals/deps_mmr.go index 17d49c600911c57eb5bb1c1d0e70e117d5a588de..ff098637630dcd83928b9e16d19939ab7600bafb 100644 --- a/test/test_internals/deps_mmr.go +++ b/test/test_internals/deps_mmr.go @@ -205,8 +205,7 @@ func TeardownMmrCaches() { if _, err = dockerProvider.Client().ImageRemove(context.Background(), imageName, types.ImageRemoveOptions{ PruneChildren: true, }); err != nil { - log.Printf("Error removing MMR cached build image '%s': %s", imageName, err.Error()) - log.Println() + log.Fatalf("Error removing MMR cached build image '%s': %s", imageName, err.Error()) } } if images, err := dockerProvider.Client().ImageList(context.Background(), types.ImageListOptions{All: true}); err != nil {