Just a nginx web server and php in single container, built from scratch with love by us.
Included libraries.
nginx:latest
php8-1.fm
composer:latest
(if build args setWITH_COMPOSER
totrue
indocker-compose.yml
)
First, pull this image with this simple bash script:
docker pull kangrsyd/nginx-php
Create docker-compose.yml
file in your selected main directories, paste this code below
version: "3.8"
services:
nginx-php:
container_name: app
image: kangrsyd/nginx-php
ports:
- "80:80"
volumes:
- ./src/html:/var/www/html
Or you can modified as you want, see official docker-compose documentation for understanding the workflows.
Next, create index.php
file inside ./src/html
directories, then, do the docker-compose to run this container
docker-compose up -d
Clone this project first in github!
git clone https://github.com/kangrsyd/docker-nginx-php.git
cd docker-nginx-php
docker-compose build
docker-compose up -d
Open your browser, type localhost
and voila! T stop and remove the containers, just type:
docker-compose down
List of file and folders, visit this project at my github repositories.
.
├── boot.sh
├── docker-compose.yml
├── Dockerfile
├── nginx
├── default.conf
└── example.test.conf
└── src
├── example
└── index.php
└── html
└── index.php
Thank you for considering contributing to this image!