Skip to content
Snippets Groups Projects
Commit 1c8d74aa authored by Travis Ralston's avatar Travis Ralston
Browse files

Don't try to delete things that don't matter

parent 5ca3f435
No related branches found
No related tags found
No related merge requests found
# ---- 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
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment