English
« Back to projectatomic.io
Ask Your Question

Revision history [back]

There's no particular place that is designated for those sorts of data stores. Since /var is the only writable location on an Atomic host, that would probably make the most sense to create a data store like that. The other option would be to start in /mnt but that's a symlink to /var/mnt anyhow.

For example, we create /var/src and every individual container gets a new directory under it. You'll want to make sure that you add the Z option to the volume in the docker run command. This will make sure to change the SELinux context on the /var/src/webapp directory but also add container specific labels to make sure that the other containers with volumes in /var/src can't read volumes they shouldn't.

sudo docker run --name some-nginx-Z -v /var/src/webapp:/usr/share/nginx/html:ro,Z -d nginx