Skip to content

Commit c079d82

Browse files
committed
prune dockers before building them in order to preserve space
1 parent 30d110e commit c079d82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/docker/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ export_docker_tag
163163

164164
BUILD_NETWORK="--network=host"
165165

166+
# Prune old docker images (24 hours)
167+
docker system prune --all --filter until=24h
168+
166169
# If DOCKER_CONTEXT is not specified, assume none and just pipe the dockerfile into docker build
167170
if [[ -z "${DOCKER_CONTEXT}" ]]; then
168171
cat $DOCKERFILE_PATH | docker build $NO_CACHE $BUILD_NETWORK $CACHE $NETWORK $IMAGE $DEB_CODENAME $DEB_RELEASE $DEB_VERSION $DOCKER_DEB_SUFFIX $DEB_REPO $BRANCH $REPO -t "$TAG" -

0 commit comments

Comments
 (0)