Score:0

Mounting files from a Docker Named Volume

ma flag

I have moved all my Docker containers to named volumes.

My Traefik Container needs two files to be mounted directly.

The current working config looks like:

volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /Container/traefik/data/configurations:/configurations
- /Container/traefik/data/traefik.yml:/traefik.yml:ro
- /Container/traefik/data/acme.json:/acme.json

When I try to use my Named Traefik Volume, the container starts but I get an "can't mount traefik.yml is a directory error"

volumes:
  - /etc/localtime:/etc/localtime:ro
  - /var/run/docker.sock:/var/run/docker.sock:ro
  - Traefik:/configurations
  - type: bind
    source: ./traefik.yml
    target: /traefik.yml
    read_only: true
  - type: bind
    source: ./acme.json
    target: /acme.json
    read_only: false

volumes:
  Traefik:
    external: true

I'm stuck not sure if this isn't possible or that I'm not getting the config right?!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.