-
Notifications
You must be signed in to change notification settings - Fork 0
Manual Mode
Ivany Pinheiro edited this page May 27, 2026
·
3 revisions
-
Configuration File Copies from the Host (Manual Mode)
-
Execute the copy command by accessing the running containers and copying the file contents directly from the terminal.
- Access the WordPress container:
docker exec -it wordpress bash- Navigate to the PHP-FPM configuration directory:
cd /etc/php/7.4/fpm/pool.d/- Display the configuration file content:
cat www.conf
-
Copy the displayed content from the terminal using
Ctrl+Shift+C -
Exit the container:
exit- Then, on the host machine, create the directory path:
./srcs/requirements/wordpress/conf/
- Create a new
www.conffile, paste the copied content usingCtrl+Shift+V, and save the file inside the directory above.
-
Repeat the same process for the NGINX container:
- Access the Nginx container:
docker exec -it nginx bash- Navigate to the NGINX configuration directory:
cd /etc/nginx/sites-available/- Display the default configuration file:
cat default
-
Copy the displayed content from the terminal using
Ctrl+Shift+C. -
Exit the container:
exit- Then, on the host machine, create the directory path:
./srcs/requirements/nginx/conf/
- Create a new
nginx.conffile, paste the copied content usingCtrl+Shift+V, and save the file inside the directory above.
👉🏼 The steps above will only work if the
wordpressandnginxcontainers are running.- To check the names of the running containers for WordPress, execute the
docker pscommand in the terminal, and a list of containers will appear. In theNAMESsection, you will see the names of the running containers. - If for some reason your containers started without a predefined name, a random name will be assigned to them. Below are tips on how to identify each container (in this case, for the tutorial):
1. wordpress: the container where theCOMMANDsection is"tail -f /dev/null"will be the WordPress container.
2. nginx: the container where theCOMMANDsection is"nginx -g daemon; "will be the NGINX container. - Pay attention to the php-fpm version, as it may change according to the installation made when creating the docker image with the Dockerfile:
> - docker cp wordpress:/etc/php/
version/fpm/pool.d/www.conf - Be mindful of the path where the
<copy_file>will be stored; it should be considered starting from the/rootInceptiondirectory.
-
After completing this step, you can ignore the
Configuration File Copies from the Host (Automatic Mode)section and continue directly to theCustomize NGINX Configurationstep.
-