Sharing folders on Beanstalk Docker
Aug 14, 2015 · Commentscodecontinuous delivery dockernginxawsbeanstalk
It is very easy to setup volume sharing in docker
. You ideally want the following folders to be shared when a new docker
is initialized for you:
/var/log
so that you can keep track of logsnginx
specific folders because you will have two instances ofnginx
running - one ondocker
and another onEC2
. This allows you to share logs- Also read this post for related info
- your personal workspace or anything that you’d like to share
Here’s how you’d do it. The keyword is VOLUME
… in your Dockerfile
VOLUME [ \
"/var/shared/", \
"/etc/nginx/sites-enabled", \
"/var/log/nginx", \
"/ws/" \
]