Skip to content

volumes_from: doesn't work with custom container names #1972

@genki

Description

@genki

According to the spec, "volumes_from" should accept the name of a service or container, but it can't find the container if the name is custom container name.
Example of docker-compose.yml here;

dev:
  image: busybox
  container_name: data
  volumes:
    - ./db/mongodb:/data/mongodb
mongo:
  image: mongodb
  volumes_from:
   - data

If I type docker-compose ps then an error raises as follows:

Service "mongo" mounts volumes from "data", which is not the name of a service or container. 

May be the timing of name resolution is too early.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions