Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srod/docker-apache-php
Apache and PHP made simple.
https://github.com/srod/docker-apache-php
Last synced: 10 days ago
JSON representation
Apache and PHP made simple.
- Host: GitHub
- URL: https://github.com/srod/docker-apache-php
- Owner: srod
- License: mit
- Created: 2015-08-16T13:45:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-16T14:24:21.000Z (about 9 years ago)
- Last Synced: 2023-04-09T12:18:14.442Z (over 1 year ago)
- Homepage:
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Supported tags and respective `Dockerfile` links
- [`5.6.12`, `5.6`, `5`, `latest` (*5.6/Dockerfile*)](https://github.com/srod/docker-apache-php/blob/master/5.6/Dockerfile)
# About this image?
This image come from the official [Docker php image](https://hub.docker.com/_/php/)
It was builded with the apache version with mod_rewrite and mysqli php extension.
And also with a `date.timezone = Europe/Paris`
![logo](https://raw.githubusercontent.com/docker-library/docs/master/php/logo.png)
# How to use this image
## Start a `apache` server instance with a Dockerfile
### Create a `Dockerfile` in your PHP project
```dockerfile
FROM srod/apache-php
COPY src/ /var/www/html/
```Where `src/` is the directory containing all your php code. Then, run the commands to build and run the Docker image:
```console
$ docker build -t my-php-app .
$ docker run -it --rm --name my-running-app my-php-app
```## Start a `apache` server instance with Docker Compose
### Create a `docker-compose.yml` in your PHP project
```dockerfile
web:
image: srod/apache-php
ports:
- "8080:80"
volumes:
- "./src:/var/www/html"
```Where `src/` is the directory containing all your php code. Then, run `docker-compose`:
```console
$ docker-compose up
```