Skip to content

Commit

Permalink
build(docs-infra): remove unused Docker artifacts when updating the p…
Browse files Browse the repository at this point in the history
…review server (#45895)

Update the `update-preview-server.sh` script that is used to update the
PR preview server to also remove unused Docker images and containers
after the update. This avoids having unused Docker artifacts grow
uncontrolled and fill up the VM disk drive.

PR Close #45895
  • Loading branch information
gkalpak authored and AndrewKushnir committed May 5, 2022
1 parent c793efd commit 58a8bd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aio/aio-builds-setup/scripts/update-preview-server.sh
Expand Up @@ -67,5 +67,9 @@ readonly CONTAINER_NAME=aio
--volume $HOST_LOGS_DIR:/var/log/aio \
"$LATEST_IMAGE_NAME"

# Clean up unused docker containers and images (to reclaim space).
sudo docker container prune --force
sudo docker image prune --all --force

echo "The new docker image has been successfully deployed."
)

0 comments on commit 58a8bd3

Please sign in to comment.