diff options
-rwxr-xr-x | packages/vyos-build-container/build.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/vyos-build-container/build.sh b/packages/vyos-build-container/build.sh index af5ae34..670c06f 100755 --- a/packages/vyos-build-container/build.sh +++ b/packages/vyos-build-container/build.sh @@ -8,10 +8,13 @@ docker rmi --force "vyos/vyos-build:${BRANCH_NAME}" || true docker rmi --force "${CUSTOM_DOCKER_REPO}/vyos/vyos-build:$BRANCH_NAME" || true echo "Building docker build container for branch ${BRANCH_NAME}..." -docker build . -t "vyos/vyos-build:${BRANCH_NAME}" +docker build --no-cache -t "vyos/vyos-build:${BRANCH_NAME}" . echo "Pushing ${BRANCH_NAME} image to registry ${CUSTOM_DOCKER_REPO}..." docker tag "vyos/vyos-build:${BRANCH_NAME}" "${CUSTOM_DOCKER_REPO}/vyos/vyos-build:${BRANCH_NAME}" docker push "${CUSTOM_DOCKER_REPO}/vyos/vyos-build:$BRANCH_NAME" +echo "Cleaning local registry..." +docker exec registry registry garbage-collect /etc/docker/registry/config.yml --delete-untagged=true + echo "Image ${BRANCH_NAME} was successfully built and pushed to registry ${CUSTOM_DOCKER_REPO}." |