Skip to content

Convert to Named Volumes #250

@zuccs

Description

@zuccs

This runs great, but is it possible to convert these into named volumes?

docker run [...] \
    -v $(pwd)/Caddyfile:/etc/Caddyfile \
    -v $HOME/.caddy:/root/.caddy \

Using Portainer as an example:

docker volume create portainer_data
docker run [...] \
    -v portainer_data:/data

This doesn't quite work but for example:

docker volume create caddy_data

# Create file first so Docker doesn't try and make it a folder
touch /var/lib/docker/volumes/caddy_data/Caddyfile

docker run -d \
    --name caddy \
    -v caddy_data:/root/.caddy \
    -v /var/lib/docker/volumes/caddy_data/Caddyfile:/etc/Caddyfile \
    -p 80:80 -p 443:443 \
    abiosoft/caddy

Is this limited due to this missing feature?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions