Sign inSign up

mbinunn/ubuntu_lamp_server_apache2_mysql_adminer_webmin

By mbinunn

•Updated over 5 years ago

UBUNTU LAMP server including Apache2, PHP, MySQL, Adminer and Webmin (server administration)

Image
0

1.2K

mbinunn/ubuntu_lamp_server_apache2_mysql_adminer_webmin repository overview


⁠Overview

This image provides an UBUNTU LAMP server including Apache2, PHP, MySQL database, Adminer(phpmyadmin replacement) and Webmin (server administration interface).
It has a built in option to generate SSL certificates with letsencrypt.
The server works by default on ports 80/443, and able to handle multiple domains in the vhosts.conf file.


⁠Usage Example:

Assuming that your user has the docker privileges, here is an example for creating and running the container:
docker run -i -t \
-p 80:80 \
-p 443:443 \
-p 10000:10000 \
-e MYSQL_PASSWD=my_mysql_root_password \
-e SUDO_PASSWD=my_admin_user_password \
--name MyLampContainer mbinunn/ubuntu_lamp_server_apache2_mysql_adminer_webmin


If you want to implement your own vhosts.conf file or load your local WWW folder, then use:
docker run -i -t \
-p 80:80 \
-p 443:443 \
-p 10000:10000 \
-v /path/to/your/WWW/folder:/home/administrator/WWW \
-v /path/to/your/vhosts.conf:/etc/apache2/sites-available/000-default.conf \
-e MYSQL_PASSWD=my_mysql_root_password \
-e SUDO_PASSWD=my_admin_user_password \
--name MyLampContainer mbinunn/ubuntu_lamp_server_apache2_mysql_adminer_webmin


NOTE:
The above command will start the container in the interactive mode, so that you'll see the apache server response.
If you want to run the server in detached mode, use the -d switch instead of -i.
Also consider using --restart=always to run the container continously when running in production.

NOTES:
-To use webmin, go to http://localhost:10000⁠ in your browser and use the "administrator" user to sign in.
-To use adminer, go to http://localhost/adminer⁠ in your browser and use the MySQL root user to sign in.


⁠SSL Certificates:

Use the following command to generate an SSL certificate for a domain:
docker exec -i -t -u root MyProxyContainer bash -c "/home/administrator/ssl-cert-generate.sh MY_NEW_DOMAIN.com"
(you'll have to enter an e-mail when doing this for the first time)

Use the following command to renew all the existing certificates:
docker exec -i -t -u root MyProxyContainer bash -c "/home/administrator/ssl-renew.sh"


⁠Optional Variables:

MYSQL_PASSWD = Initializes the MySQL root user's password.
SUDO_PASSWD = Initializes the "administrator" user's password.
ROOT_PASSWD = Initializes the root password of UBUNTU


⁠Saving your own image

After making changes, installing software or changing startup.sh, save your own image by using the following command:
docker commit MyLampContainer my_own_lamp_image:v1


⁠Source code

See my source code on https://github.com/mbinnun/Dockers/tree/main/ubuntu-lamp-server-apache2-mysql-adminer⁠

Tag summary

Content type

Image

Digest

Size

311.4 MB

Last updated

over 5 years ago

docker pull mbinunn/ubuntu_lamp_server_apache2_mysql_adminer_webmin