Skip to content

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.

      1. Access the WordPress container:
      docker exec -it wordpress bash
      1. Navigate to the PHP-FPM configuration directory:
      cd /etc/php/7.4/fpm/pool.d/
      1. Display the configuration file content:
      cat www.conf
      1. Copy the displayed content from the terminal using Ctrl + Shift + C

      2. Exit the container:

      exit
      1. Then, on the host machine, create the directory path:
      ./srcs/requirements/wordpress/conf/
      1. Create a new www.conf file, paste the copied content using Ctrl + Shift + V, and save the file inside the directory above.

    • Repeat the same process for the NGINX container:

      1. Access the Nginx container:
      docker exec -it nginx bash
      1. Navigate to the NGINX configuration directory:
      cd /etc/nginx/sites-available/
      1. Display the default configuration file:
      cat default
      1. Copy the displayed content from the terminal using Ctrl + Shift + C.

      2. Exit the container:

      exit
      1. Then, on the host machine, create the directory path:
      ./srcs/requirements/nginx/conf/
      1. Create a new nginx.conf file, paste the copied content using Ctrl + Shift + V, and save the file inside the directory above.

      👉🏼 The steps above will only work if the wordpress and nginx containers are running.

      • To check the names of the running containers for WordPress, execute the docker ps command in the terminal, and a list of containers will appear. In the NAMES section, 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 the COMMAND section is "tail -f /dev/null" will be the WordPress container.
        2. nginx: the container where the COMMAND section 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 /rootInception directory.
    • After completing this step, you can ignore the Configuration File Copies from the Host (Automatic Mode) section and continue directly to the Customize NGINX Configuration step.

    ⏮️ Previous
    Next ⏭️

Clone this wiki locally