|
|
@@ -14,23 +14,23 @@ What's included: |
|
|
|
|
|
|
|
* Download the *ubuntu-lamp-docker* repository: |
|
|
|
|
|
|
|
``` |
|
|
|
git clone https://github.com/theodotos/ubuntu-lamp-docker.git |
|
|
|
``` |
|
|
|
``` |
|
|
|
git clone https://git.theo-andreou.org/Personal/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 |
|
|
|
|
|
|
@@ -44,31 +44,31 @@ docker pull theodotos/ubuntu-lamp |
|
|
|
|
|
|
|
* 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:/var/lib/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 |
|
|
|
``` |
|
|
|
``` |