How to specify volume size while creating a volume in Docker Desktop

Viewed 13

I have tried creating the following volume in Docker desktop:

docker volume create --driver local --opt o=100m --opt device=tmpfs --opt type=tmpfs pv1

It got created but getting the following error while trying to use it while creating a container:

docker: Error response from daemon: error while mounting volume '/var/lib/docker/volumes/pv1/_data': failed to mount local volume: mount tmpfs:/var/lib/docker/volumes/pv1/_data, data: 100m: invalid argument.

Any way to solve this issue?

0 Answers
Related