We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goal is to limit the amount of data that is not in the layers of base image, but in the diff of a Docker container.
A goad attempt can be found here: https://stackoverflow.com/questions/29029326/how-to-define-a-disk-quota-for-docker-containers This one may fit in the DockerExec.
DockerExec
do_enable_quota() { local ID=$1 local QUOTA_MB=$2 local LOOPBACK=/var/lib/docker/aufs/diff/$ID-loopback local LOOPBACK_MOUNT=/var/lib/docker/aufs/diff/$ID-loopback-mount local DIFF=/var/lib/docker/aufs/diff/$ID docker stop -t=0 $ID sudo dd of=$LOOPBACK bs=1M seek=$QUOTA_MB count=0 sudo mkfs.ext4 -F $LOOPBACK sudo mkdir -p $LOOPBACK_MOUNT sudo mount -t ext4 -n -o loop,rw $LOOPBACK $LOOPBACK_MOUNT sudo rsync -rtv $DIFF/ $LOOPBACK_MOUNT/ sudo rm -rf $DIFF sudo mkdir -p $DIFF sudo umount $LOOPBACK_MOUNT sudo rm -rf $LOOPBACK_MOUNT sudo mount -t ext4 -n -o loop,rw $LOOPBACK $DIFF docker start $ID }
The text was updated successfully, but these errors were encountered:
Sengorius
No branches or pull requests
Goal is to limit the amount of data that is not in the layers of base image, but in the diff of a Docker container.
A goad attempt can be found here: https://stackoverflow.com/questions/29029326/how-to-define-a-disk-quota-for-docker-containers
This one may fit in the
DockerExec
.The text was updated successfully, but these errors were encountered: