Skip to content

A simple LAMP image using Ubuntu, Apache, PHP and MariaDB in a single image

License

Notifications You must be signed in to change notification settings

karye/docker-lampw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-LAMPW

Docker-LAMPW is a LAMP stack (Apache, MariaDB and PHP). Now including Node.js.

Component latest-1804
Apache 2.4
MariaDB 10.1
PHP 7.2
Composer 1.6.3
phpMyAdmin 5.1.0
Webmin 1.962
Node.js 14

Using the image

Open ports

  • Web is accessed on port 8080
  • Webmin is accessed on port 10000
  • Nodejs is accessed on port 3000

Launching in Linux

# /var/www i mapped to /home/user/github
# Launch the image with autostart when docker start
docker run --restart unless-stopped -d -p 8080:80 -p 3000:3000 -p 10000:10000 \
-v /home/user/github:/var/www -v mysql-data:/var/lib/mysql --name lamp karye/lampw

Launching in Windows

# /var/www i mapped to C:\github
# Launch the image with autostart when docker start
docker run -d --restart unless-stopped -p 8080:80 -p 3000:3000 -p 10000:10000 `
-v "C:\github:/var/www" -v "mysql-data:/var/lib/mysql" --name lamp karye/lampw

Test installation

Launch http://localhost:8080/lampw to test webbserver is up and list setup info.

Useful Docker commands

# View logg
docker logs lamp

# Attach to console
docker exec -it lamp bash

# View running containers
docker ps -a

# Updating to latest image
# Pull latest image from https://hub.docker.com/repository/docker/karye/lampw
docker stop karye/lampw
docker rm karye/lampw
docker pull karye/lampw

Project layout

The webroot

The url http://localhost:8080 is mapped to '/var/www/' in the docker container.

/ (project root)
/var/www/ (your folders and files live here)

The databases

Database data is located on a separate volume for datapersistens. The databases will therefore not be lost when reinstalling or upgrading LAMPW.

Administration

webmin

Docker-LAMPW comes pre-installed with Webmin available at https://localhost:10000.
Login in with user root and password pass.
Local timezone is 'Europe/Stockholm'. You may change timezone in Webmin.

PHPMyAdmin

Docker-LAMPW comes pre-installed with phpMyAdmin available at http://localhost:8000/phpmyadmin.
Login in with user admin and password pass.

License

Docker-LAMPW is licensed under the Apache 2.0 License.

About

A simple LAMP image using Ubuntu, Apache, PHP and MariaDB in a single image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 53.4%
  • Dockerfile 33.8%
  • PHP 7.5%
  • CSS 5.3%