I can apply the disk size quota with the argument "- storage-opt size = 1536M when working with devicemapper. For example:
docker run -dt --name testing --storage-opt size=1536M ubuntu
The problem is , how can I do this using docker-compose using the * .yml file.
thank.
ALTERNATIVE DECISION:
Use devicemapper as the default storage driver for Docker and set the basics for each container.
Use default devicemapper:
1) apt-get install lvm2 thin-provisioning-tools
2) modify / etc / default / docker as follows:
--storage-driver devicemapper --storage-opt dm.basesize=3G
3) do one after another:
systemctl stop docker
systemctl daemon-reload
rm -rf /var/lib/docker
systemctl start docker
4) 3 . , vol. RUN devicemapper ( , ). ,
docker run --storage-opt size=1536M ubuntu