Skip to content

cskiller24/PHP-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

PHP-Docker

Dockerize PHP App using NGINX and PHP-FPM

How to use

  1. Clone the repository
  2. Open terminal and change directory to docker $ cd docker
  3. Run $ docker-compose up -d this will build all the required images
  4. To check if installed successfully run at browser localhost:8000
  5. Enjoy!

You should see in localhost:8000 like this image

Configure the Ports

  1. Access the file docker/docker-compose.yml file
  2. You will see the port - 8000:80 change the 8000 part to any ports you want
  3. open terminal and change directory to docker $ cd docker
  4. Run $ docker-compose up -d
  5. To check if installed successfully run at browser localhost:<port>
  6. Enjoy!

image

Run commands in Docker Container

  1. Open terminal and run $ docker ps
  2. You will see all the running docker container, find the name where the php runs Usually at port 9000/tcp (Highlighted part) image
  3. Run $ docker exec -it <name> bash
  4. To check if success run $ php -v
  5. Enjoy

image

About

Dockerize PHP App using NGINX and PHP-FPM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published