Skip to content

Instantly share code, notes, and snippets.

@stefanpejcic
Last active October 6, 2023 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpejcic/0bbb0a00241383e55d4ae53805db78e1 to your computer and use it in GitHub Desktop.
Save stefanpejcic/0bbb0a00241383e55d4ae53805db78e1 to your computer and use it in GitHub Desktop.
Mount 10gb to limit docker container writable layer
dd if=/dev/zero of=myfs.ext4 bs=1M count=10240
mkfs.ext4 myfs.ext4
docker inspect -f '{{ .GraphDriver.DataDir }}' <container_id>
mount -o loop /path/to/myfs.ext4 /path/to/writable/layer/folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment