Skip to content

Commit c7fd7e9

Browse files
committed
build(docs-infra): remove unused Docker artifacts when updating the preview server
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.
1 parent da3e8c3 commit c7fd7e9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

aio/aio-builds-setup/scripts/update-preview-server.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,9 @@ readonly CONTAINER_NAME=aio
6767
--volume $HOST_LOGS_DIR:/var/log/aio \
6868
"$LATEST_IMAGE_NAME"
6969

70+
# Clean up unused docker containers and images (to reclaim space).
71+
sudo docker container prune --force
72+
sudo docker image prune --all --force
73+
7074
echo "The new docker image has been successfully deployed."
7175
)

0 commit comments

Comments
 (0)