Answer the question
In order to leave comments, you need to log in
Docker + nginx + php-fpm bundle how to share folders between containers?
Good afternoon.
Question: how can I share folders between containers, taking into account the fact that periodic updates will be needed?
There is a php application, it contains a web interface, a separate worker (runs through cli). The decision was made to separate this application and move it to docker.
Created:
1. docker container with php_fpm environment + source + static files
2. docker-compose.yml: (common features)
services:
nginx:
volumes:
source:/var/www
php:
image: php_app
volumes:
source:/var/www
worker:
image: php_app
volumes:
source:
external: true
Answer the question
In order to leave comments, you need to log in
I had to apply
a very ugly solution: gitlab-cicd added copying to that
$ docker cp $(docker ps -f name=php-q): /var/www /pathto/docker/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question