Bash Commands
You can run the following command to see how much space has been currently used on the Docker Layer Caching volume with Remote Docker.
ssh remote-docker 'sudo df' | grep '/var/lib/docker' | awk '{print $4}'
You could store that value and use it in additional scripting to perform actions to that Remote Docker instance and volume.
DLC_AVAILABLE_SPACE=$(ssh remote-docker 'sudo df' | grep '/var/lib/docker' | awk '{print $4}');
You could also run to display the amount of disk space used by the Docker daemon:
docker system df
This would produce more human-readable output.
Comments
Article is closed for comments.