Skip to content

Anonymous readonly volumes #45297

@AndreKR

Description

@AndreKR

Description

This feels like a bug but since there's a dedicated message saying that it isn't supported I guess it can be classified as a feature request.

When I try to create a volume that is both anonymous and readonly like this:

docker run --mount 'target=/ms,volume-driver=rclone,volume-opt=remote=ms:,readonly' ...

I get:

docker: Error response from daemon: invalid mount config for type "volume": must not set ReadOnly mode when using anonymous volumes.

I don't understand what one has to do with the other.

Using a readwrite volume is bad for the usual reasons and using a named volume is bad because as far as I know those are not automatically removed when the container is removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/volumesVolumeskind/enhancementEnhancements are not bugs or new features but can improve usability or performance.status/0-triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions