From 8f59eb9c14c4afd8e1fb5353fd49f3dded767fa5 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 7 Sep 2024 13:51:26 +0800 Subject: [PATCH] Prune older images after successful deployment --- .woodpecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index c47e875..8836806 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -28,5 +28,6 @@ steps: docker image rm "$IMAGE" || true; docker volume rm "$VOLUME" || true; docker pull "$IMAGE"; - docker compose -f docker-compose.demo.yml up -d;" + docker compose -f docker-compose.demo.yml up -d; + docker image prune -af;" secrets: [SSH_KEY, REMOTE_HOST, PROJECT_DIRECTORY, IMAGE, VOLUME]