You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Since docker 1.3.0 / fig 1.0.0 volumes are not mounted when fig up'ing existing containers #622
This seems correct to me. Some things you could try to debug it:
docker inspect the containers when they're up to see what it's doing
docker will silently ignore a volume if the path doesn't exist, it's possible it's not doing these relative paths correctly. Maybe try adding a ./ prefix
paths in the fig.yml are relative to the current working directory, so if you do something like fig -f somepath/fig.yml it might not work (because the paths will be wrong
Perhaps it's a silly question.... but are you using a Virtual Machine to run docker and fig ? If so, do the paths referenced in your "volumes" directives exists inside the VM?
@mindo this looks like a similar issue to #613. fig up will copy volumes from the previous container when it recreates them. I think if you do: fig stop && fig rm --force -v ngx it should remove those volumes and the next time you create it, it should mount the correct host volumes.
I can't mount relative folder through fig on centos7:
[root@localhost using-fig]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost fig-master]# docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa/1.3.2
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 39fa2fa/1.3.2
[root@localhost fig-master]#
[root@localhost using-fig]# ls -l
total 4
drwxr-xr-x. 3 root root 41 Feb 13 17:30 elasticsearch
-rwxr-xr-x. 1 root root 141 Feb 13 17:16 fig.yml
drwxr-xr-x. 2 root root 59 Feb 13 15:32 web
[root@localhost using-fig]# ls -l elasticsearch/
total 4
drwxrwxrwx. 2 root root 6 Feb 13 16:59 data
-rwxr-xr-x. 1 root root 49 Feb 13 16:23 elasticsearch.yml
so when I run fig up -d
[root@localhost using-fig]# fig up -d
Recreating usingfig_es_1...
[root@localhost using-fig]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e7f8547a4ad1 library/elasticsearch:1.4.3 "elasticsearch" 5 seconds ago Up 4 seconds 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp usingfig_es_1
[root@localhost using-fig]# docker exec -ti usingfig_es_1 bash
root@e7f8547a4ad1:/# ls -l /data/
ls: cannot open directory /data/: Permission denied
@dnephin I've managed to find some time to check for the bug:
$ docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa/1.3.2
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 39fa2fa/1.3.2
----
$ fig --version
fig 1.0.1
I've deleted every single image I had and built them from scratch then run fig up (some container use links, I can provide the fig.yml privately if needed).
Everything is ok:
Now I fig stop all the containers and fig up them again (not running fig rm --force)
And the bugs doesn't happen: everything just works fine.
All the data is where I wanted it to be.
Just in case this will happen again later on I've pasted the output of the command you asked here
FWIW, I updated to docker 1.5.0 and the issue seems to be gone.
I'm able to fig up stopped containers without fig rm them beforehand, and volumes are re-mounted correctly.
Hi, im experienceing with same problem, after restarting my server the containers are starting but not mounting the volumes, the changes i have done to my server is updated to Ubuntu server 15.10 and docker-compose version is 1.6.0, but when i goto my docker-compose folder and start them then volumes are mounting correctly.
Activity
mindo commentedon Nov 6, 2014
This also happens with docker 1.3.1 and fig 1.0.1.
Even more weird is that if a container is ran using fig:
The volumes are mounted just fine.
dnephin commentedon Nov 6, 2014
Are you using volumes or volumes_from? A sample fig.yml may help in debugging.
mindo commentedon Nov 6, 2014
My fig.yml:
All folders defined as volumes are on the same level as fig.yml.
dnephin commentedon Nov 8, 2014
This seems correct to me. Some things you could try to debug it:
docker inspectthe containers when they're up to see what it's doing./prefixfig.ymlare relative to the current working directory, so if you do something likefig -f somepath/fig.ymlit might not work (because the paths will be wrongnireak commentedon Nov 9, 2014
Perhaps it's a silly question.... but are you using a Virtual Machine to run docker and fig ? If so, do the paths referenced in your "volumes" directives exists inside the VM?
mindo commentedon Nov 11, 2014
I am running this directly on my notebook (ubuntu 14.10, no virtual machine).
I also tried:
and
and neither worked.
dnephin commentedon Nov 11, 2014
@mindo this looks like a similar issue to #613.
fig upwill copy volumes from the previous container when it recreates them. I think if you do:fig stop && fig rm --force -v ngxit should remove those volumes and the next time you create it, it should mount the correct host volumes.mindo commentedon Nov 11, 2014
@dnephin yes, doing
solves it but only until the next reboot/service docker restart.
Test run:
Volumes are mounted just fine.
Volumes still work.
Volumes fail to mount! But running:
The Volumes work without problems.
schickling commentedon Dec 5, 2014
Same here. Any progress on this?
morvans commentedon Dec 5, 2014
FWIW, the issue seems fixed for me with docker 1.3.2 / fig 1.0.1
schickling commentedon Dec 5, 2014
I'm using docker 1.3.2 / fig 1.0.1. Still doesn't work for me.
morvans commentedon Dec 8, 2014
@schickling : yeah, spoke too soon, it still doesn't work for me either eventually.
bercab commentedon Dec 12, 2014
Hello, I have the same issue. Can't bind-mount volumes with
fig runnorfig up.Running with
fig --verbose, I see volume is correctly parsed when passing toclient.start():But docker inspect shows volume is not bind-mounted:
I think is not a problem of fig, but a problem of docker-py with newer versions of docker.
According to docs, binds dict seems correct: http://docker-py.readthedocs.org/en/latest/volumes/
Maybe docker-py is breaking its API?
Looking at docs link above, seems that
client.create_volume()spects a list of volumes (ej:['test', ]), but fig is passing a dict:Also seems other projects are running the same issue:
saltstack/salt#14089
shusugmt commentedon Dec 14, 2014
I've faced the exact same issue using
Reverting docker version back to lxc-docker-1.3.3 solved the problem for now.
dnephin commentedon Dec 14, 2014
@s2ugimot for docker 1.4.0 see #723
25 remaining items
morvans commentedon Feb 13, 2015
Ok I'll try to get back to you with a stripped down fig.yml and/or a test case involving docker alone.
dmitry-saritasa commentedon Feb 13, 2015
I can't mount relative folder through fig on centos7:
[root@localhost using-fig]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost fig-master]# fig --version
fig 1.0.1
[root@localhost fig-master]# docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa/1.3.2
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 39fa2fa/1.3.2
[root@localhost fig-master]#
fig.yml:
[root@localhost using-fig]# pwd
/home/apps/using-fig
[root@localhost using-fig]# ls -l
total 4
drwxr-xr-x. 3 root root 41 Feb 13 17:30 elasticsearch
-rwxr-xr-x. 1 root root 141 Feb 13 17:16 fig.yml
drwxr-xr-x. 2 root root 59 Feb 13 15:32 web
[root@localhost using-fig]# ls -l elasticsearch/
total 4
drwxrwxrwx. 2 root root 6 Feb 13 16:59 data
-rwxr-xr-x. 1 root root 49 Feb 13 16:23 elasticsearch.yml
so when I run fig up -d
[root@localhost using-fig]# fig up -d
Recreating usingfig_es_1...
[root@localhost using-fig]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e7f8547a4ad1 library/elasticsearch:1.4.3 "elasticsearch" 5 seconds ago Up 4 seconds 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp usingfig_es_1
[root@localhost using-fig]# docker exec -ti usingfig_es_1 bash
root@e7f8547a4ad1:/# ls -l /data/
ls: cannot open directory /data/: Permission denied
however if I change fig to absolute path
fig.yml:
everything works just fine
nomadster commentedon Feb 18, 2015
@dnephin I've managed to find some time to check for the bug:
I've deleted every single image I had and built them from scratch then run fig up (some container use links, I can provide the fig.yml privately if needed).
Everything is ok:
Now I
fig stopall the containers andfig upthem again (not running fig rm --force)And the bugs doesn't happen: everything just works fine.
All the data is where I wanted it to be.
Just in case this will happen again later on I've pasted the output of the command you asked here
dnephin commentedon Feb 18, 2015
Ok, this sounds a lot like re-using old volumes, and might be fixed by #858
morvans commentedon Feb 18, 2015
@nomadster, if you restart the docker daemon between fig stop and fig up, are the volumes re-mounted correctly ?
nomadster commentedon Feb 18, 2015
@morvans
Some of the container doesn't start correctly. I suppose because the volumes are not mounted correctly.
morvans commentedon Feb 26, 2015
FWIW, I updated to docker 1.5.0 and the issue seems to be gone.
I'm able to fig up stopped containers without fig rm them beforehand, and volumes are re-mounted correctly.
UnknownHero commentedon Mar 2, 2015
yes, 1.4.0 not work , but 1.5.0 work fine
Vrakfall commentedon Mar 3, 2015
@morvans Yeah, I think the problem was mainly coming from docker itself and the last big update was meant to solve big mounting issues.
aanand commentedon Mar 3, 2015
I'm closing this issue as it seems to be a confusion of different reports - if anyone can produce a minimal failing case, please open a new one.
CWSpear commentedon Jan 28, 2016
I'm seeing some behavior that seems related and I have a reduced test case here: #2776
knvpk commentedon Feb 16, 2016
Hi, im experienceing with same problem, after restarting my server the containers are starting but not mounting the volumes, the changes i have done to my server is updated to Ubuntu server 15.10 and docker-compose version is 1.6.0, but when i goto my docker-compose folder and start them then volumes are mounting correctly.
dnephin commentedon Feb 16, 2016
You might be hitting #2912
Update prometheus/common to v0.10.0 (docker#622)