Closed ohmystack closed 8 years ago
@ohmystack - Thank you! However, you can already use docker volume create
with a size option instead of using the name@size syntax, nothing is forcing you to use this syntax, so I think this is moot.
If you require that feature of docker volume, then you should always create your images first using docker volume create
and the correct options. The existing code already allows a default size by not specifying any @size
decorator if you wanted to autocreate on docker run.
@porcupie Maybe we should prohibit doing that wrong action.
Oh... I miss the tests.
If we put
@<size>
at the end of the image name, Docker won't recognize it, and Docker will save<image-name>@<size>
as the volume name. However, this image is actually the same one as<image-name>
, without suffix. We should make Docker treating them as the same image, instead of two different ones. This is important because Docker caches the volume info, the volume has been referenced by which container, by image name.After this change, when creating images at
docker run
, plugin will statically use the default value. When creating images bydocker volume create
, user can pass size in opts to declare a customized value.