Open pete-fab opened 6 years ago
Howdy!
You're misunderstanding the purpose of --with-volumes
, which mounts a local directory into the Conductor container for use during builds. It does not make extra volumes available to your target containers. For that, you'd need to use the volumes:
section of the container.yml
file.
If this can be made clearer in the documentation somehow, I'm open to suggestions.
Thanks!
Hi J00bar.
Thanks for the clarification. I guess for noobs like me, adding a statement that makes this distinction would help. I would place something of the sort in command reference for the --with-volumes
option for run
:
For mounting volumes in containers themselves, rather than the Conductor, use
volumes:
section of thecontainer.yml
.
Thanks :)
I'll take it. Thanks!
I am aware of similarity to 524 bug, the difference here is the
run
command.ISSUE TYPE
container.yml
OS / ENVIRONMENT
SUMMARY
Running container does not mount the volumes defined on the cli using --with-volumes.
STEPS TO REPRODUCE
EXPECTED RESULTS
In given container I should have
/mnt/host/test/
directory available for read a write. This can be verified with$ docker inspect container_name
and the mount should be visible in theMounts
section. This works, when running the image withdocker
that was built withansible-container
, like so:$ docker run -v $(pwd)/test:/mnt/host/test/:rw -d ansible-abgenesis-abgenesis sleep infinity
ACTUAL RESULTS