https://github.com/fraigo/docker-centos-apache-php
Docker image for Centos7 / Apache 2.4 / PHP 7.1 / server
https://github.com/fraigo/docker-centos-apache-php
apache apache24 centos7 docker dockerfile php php55 php71
Last synced: 3 months ago
JSON representation
Docker image for Centos7 / Apache 2.4 / PHP 7.1 / server
- Host: GitHub
- URL: https://github.com/fraigo/docker-centos-apache-php
- Owner: fraigo
- Created: 2019-02-09T00:08:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T18:32:46.000Z (over 5 years ago)
- Last Synced: 2025-01-19T18:43:44.928Z (4 months ago)
- Topics: apache, apache24, centos7, docker, dockerfile, php, php55, php71
- Language: Dockerfile
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-centos-apache-php
Create Docker images for Web server based on Centos, Apache and PHP
## Centos7, Apache 2.4, PHP 7.1
Create base image (php71-apache24-base)
`docker image build -t php71-apache24-base ./php71-apache24-base`
Create image with extra components, custom config (`.custom-config/`) and web application code (`.www/` folder)
`docker image build -t php71-apache24 ./php71-apache24`
Run image
`docker run -p 8080:8080 php71-apache24`
Open local web server
`http://localhost:8080/`
### PHP 7.1 Public docker image
https://hub.docker.com/r/franciscoigor/php71-apache24-centos7
## Centos7, Apache 2.4, PHP 5.5
Create base image (php55-apache24-base)
`docker image build -t php55-apache24-base ./php55-apache24-base`
Create image with extra components, custom config (`.custom-config/`) and web application code (`.www/` folder)
`docker image build -t php55-apache24 ./php55-apache24`
Run image
`docker run -p 8080:8080 php55-apache24`
Open local web server
`http://localhost:8080/`
### PHP 5.5 Public docker image
https://hub.docker.com/r/franciscoigor/php55-apache24-centos7
## Docker-compose example
A common PHP development environment with :
* PHP 7.1 / Apache 2.4 / Centos7
* `phpapp` container
* HTTP Port `8080`
* MariaDB 10.3
* `mariadb` container
* PHPMyAdmin
* `myadmin` container
* HTTP port `8082`### Run containers
`docker-compose up -d`
### Stop containers
`docker-compose stop`
### Unload containers
`docker-compose down`
Access containers: