docker - how to create data volume from image for use in nginx container -


i have image (not container) has data baked in @ /store. image not else, vessel holding data in. want create docker-compose file nginx container has access in /store @ /usr/share/nginx/html

do need make intermediary container first? not sure how docker-compose file look. thanks

the best way managing use docker volume store you're /store datas. can once creating container image, mount empty docker volume in it, , copy content of /store in external docker volume.

if still need use /store existing image need instanciate container if , retrieve exposed volume nginx container. (using volume_from). in case both containers need on same host.


Comments