completed the README
This commit is contained in:
parent
e892c59059
commit
29d696cafa
75
README.md
75
README.md
|
@ -1 +1,74 @@
|
|||
# ubuntu-lamp-docker
|
||||
# Ubuntu 16.04 (aka xenial) LAMP Docker container
|
||||
|
||||
This project bulds a simple Ubuntu 16.04 LAMP docker container. It is based on the official Ubuntu 16.04 (xenial) Docker image.
|
||||
|
||||
What's included:
|
||||
|
||||
* Ubuntu 16.04.1 LTS
|
||||
* Apache 2.4.18
|
||||
* MariaDB Server 10.0.27
|
||||
* PHP 7.0.8
|
||||
|
||||
|
||||
### Build instructions
|
||||
|
||||
* Download the *ubuntu-lamp-docker* repository:
|
||||
|
||||
```
|
||||
git clone https://github.com/theodotos/ubuntu-lamp-docker.git
|
||||
```
|
||||
|
||||
* Build the image:
|
||||
|
||||
```
|
||||
cd ubuntu-lamp-docker
|
||||
docker build -t "username/ubuntu-lamp" .
|
||||
```
|
||||
|
||||
Verify that the image has been created in the local image store:
|
||||
|
||||
```
|
||||
docker images | grep ubuntu-lamp
|
||||
theodotos/ubuntu-lamp latest f54ab36adc4f About a minute ago 508.8 M
|
||||
```
|
||||
|
||||
### Use it directly from Docker Hub
|
||||
|
||||
If you do not want to build it yourself you can pull it from https://hub.docker.com:
|
||||
|
||||
```
|
||||
docker pull theodotos/ubuntu-lamp
|
||||
```
|
||||
|
||||
### Run the container
|
||||
|
||||
* Prepare the necessary volumes for persistency:
|
||||
|
||||
```
|
||||
docker volume create --name lamp-mariadb
|
||||
docker volume create --name lamp-docroot
|
||||
docker volume create --name lamp-apache-conf
|
||||
docker volume create --name lamp-mariadb-conf
|
||||
```
|
||||
|
||||
* Run the container:
|
||||
|
||||
```
|
||||
docker run -d -p 2080:80 -p 2443:443 --name lamp -v lamp-mariadb:/varlib/mysql -v lamp-docroot:/var/www/html -v lamp-apache-conf:/etc/apache2 -v lamp-mariadb-conf:/etc/mysql theodotos/ubuntu-lamp
|
||||
```
|
||||
|
||||
* Verify that its up and running:
|
||||
|
||||
```
|
||||
docker ps | grep lamp
|
||||
c5b0f3d48307 theodotos/ubuntu-lamp "/bin/sh -c /entrypoi" About a minute ago Up About a minute 3306/tcp, 0.0.0.0:2080->80/tcp, 0.0.0.0:2443->443/tcp lamp
|
||||
```
|
||||
|
||||
* Check the logs:
|
||||
|
||||
```
|
||||
docker logs lamp
|
||||
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
|
||||
160923 04:35:57 mysqld_safe Logging to syslog.
|
||||
160923 04:35:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue