Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Named Volumes #250

Open
zuccs opened this issue May 6, 2020 · 0 comments
Open

Convert to Named Volumes #250

zuccs opened this issue May 6, 2020 · 0 comments

Comments

@zuccs
Copy link

zuccs commented May 6, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant