1
0
mirror of https://github.com/Luzifer/docker-php5-nginx.git synced 2024-09-19 15:23:02 +00:00
docker-php5-nginx/README.md

47 lines
1.3 KiB
Markdown
Raw Normal View History

2014-09-06 22:54:43 +00:00
# luzifer/php5-nginx Dockerfile
2014-09-06 23:06:57 +00:00
This repository contains **Dockerfile** of [Nginx](http://nginx.org/) with PHP5 applications which have an `index.php` as an entry point like [PHPFramework](https://github.com/Luzifer/PHPFramework) apps for [Docker](https://www.docker.com/)'s [automated build](https://registry.hub.docker.com/u/luzifer/php5-nginx/) published to the public [Docker Hub Registry](https://registry.hub.docker.com/).
2014-09-06 22:54:43 +00:00
## Base Docker Image
- [ubuntu](https://registry.hub.docker.com/_/ubuntu/)
## Installation
1. Install [Docker](https://www.docker.com/).
2. Download [automated build](https://registry.hub.docker.com/u/luzifer/php5-nginx/) from public [Docker Hub Registry](https://registry.hub.docker.com/): `docker pull luzifer/php5-nginx`
(alternatively, you can build an image from Dockerfile: `docker build -t="luzifer/php5-nginx" github.com/luzifer/php5-nginx`)
## Usage
Create a `Dockerfile` similar to the following in your application code folder:
```
FROM luzifer/php5-nginx
RUN mkdir -p /application
ADD . /application
2014-09-06 22:54:43 +00:00
EXPOSE 80
CMD ["/usr/local/bin/container-run.sh"]
```
Then, execute the following to build the image:
2014-09-06 23:07:44 +00:00
```
docker build -t myuser/myapp .
```
2014-09-06 22:54:43 +00:00
This will create an image named `myuser/myapp` with your application ready to go.
To launch it, just type:
2014-09-06 23:05:23 +00:00
```
docker run -d -p 80 myuser/myapp
```
2014-09-06 22:54:43 +00:00
Easy!