Skip to content

Commit 1fc1713

Browse files
heathen711ebr
authored andcommitted
bugfix(container-builder) Use the mnt space instead of root space for docker images
1 parent 2a796fe commit 1fc1713

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build-container.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,21 @@ jobs:
4545
steps:
4646
- name: Free up more disk space on the runner
4747
# https://github.com/actions/runner-images/issues/2840#issuecomment-1284059930
48+
# the /mnt dir has 70GBs of free space
49+
# /dev/sda1 74G 28K 70G 1% /mnt
50+
# According to some online posts the /mnt is not always there, so checking before setting docker to use it
4851
run: |
4952
echo "----- Free space before cleanup"
5053
df -h
5154
sudo rm -rf /usr/share/dotnet
5255
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
5356
sudo swapoff /mnt/swapfile
5457
sudo rm -rf /mnt/swapfile
58+
if [ -d /mnt ]; then
59+
sudo chmod -R 777 /mnt
60+
echo '{"data-root": "/mnt/docker-root"}' | sudo tee /etc/docker/daemon.json
61+
sudo systemctl restart docker
62+
fi
5563
echo "----- Free space after cleanup"
5664
df -h
5765

0 commit comments

Comments
 (0)