In this example we are going to use Docker’s “(named) volumes” option to keep our application files/data. This option offers better security as opposed to “bind(shared) volumes” in production environment. For more details read Manage data in Docker  page. Since we are not using “bind(shared) volumes” (this is generally used in development environment) we will be copying the application code into our “data container” called my_app . PHP-FPM and Nginx containers will then use this container to access the application data.

#docker #php #nginx

Share Application Data with PHP-FPM and Nginx Docker Containers
1.20 GEEK