Skip to content

Commit

Permalink
[fix][ci] Configure Docker data-root to /mnt/docker to avoid running …
Browse files Browse the repository at this point in the history
…out of disk space (apache#23909)

(cherry picked from commit ed5dbb5)
(cherry picked from commit 9804170)
  • Loading branch information
lhotari authored and nikhil-ctds committed Jan 31, 2025
1 parent 8e8af6c commit f58ea21
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/clean-disk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ runs:
time df -BM / /mnt
echo "::endgroup::"
done
if [[ "${{ inputs.mode }}" == "full" ]]; then
echo "::group::Moving /var/lib/docker to /mnt/docker"
sudo systemctl stop docker
echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json
sudo mv /var/lib/docker /mnt/docker
sudo systemctl start docker
time df -BM / /mnt
echo "::endgroup::"
fi
echo "::group::Cleaning apt state"
time sudo bash -c "apt-get clean; apt-get autoclean; apt-get -y --purge autoremove"
time df -BM / /mnt
Expand Down

0 comments on commit f58ea21

Please sign in to comment.