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

Run + data only container + volumes_from + volumes won't mount to host #1091

Closed
pocesar opened this issue Mar 11, 2015 · 3 comments
Closed

Comments

@pocesar
Copy link

pocesar commented Mar 11, 2015

I have this setting in my docker-compose.yml:

volumes:
    image: "volumes"
    volumes:
        - "/var/www:/srv/www"
        - "/var/staging:/srv/staging"
web:
    image: "web:staging"
    ports:
        - "443:443"
        - "80:80"
    volumes_from:
        - "volumes"

volumes image is just "tianon/true", when doing docker-compose run web, the root_volumes_1 container is created but the host aren't mounted:

{
  "Volumes": {
        "/srv/staging": "/var/lib/docker/vfs/dir/61023818c6fcccbd9f14511ed61dd3fd2cceb8d08b2b8c60bab3a370caca681f",
        "/srv/www": "/var/lib/docker/vfs/dir/b6d5dc1491f92a621c3b008f23b1aa92b18149e90bcbf5890ba48e6f67709399"
  }
}

When I start it manually using docker-compose run volumes, it mounts correctly (and creates it as root_volumes_run_1 but root_web_run_1 won't see it):

{
    "Volumes": {
        "/srv/staging": "/var/staging",
        "/srv/www": "/var/www"
    },
}

Using Docker 1.5.0 and docker-compose 1.1.0.

@pocesar
Copy link
Author

pocesar commented Mar 11, 2015

Workaround for this was to trick docker-compose:

docker run -v /var/www:/srv/www -v /var/staging:/srv/staging --name=root_volumes_1 volumes
docker-compose run -d --service-ports web

@dnephin
Copy link

dnephin commented Mar 11, 2015

This is very likely fixed by #858

@dnephin
Copy link

dnephin commented Sep 28, 2015

No response from OP so going to close this issue. Should be fixed. Please re-open if it is not.

@dnephin dnephin closed this as completed Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants