Sign inSign up

marekhadas9/lampstack

By marekhadas9

Updated over 7 years ago

[ ARM / x86 ] MySQL 8.0.15 / 5.7.2 PHP 7.2.15 APACHE 2.4.29 LAMP STACK

Image
1

4.1K

marekhadas9/lampstack repository overview

GitHub Logo

LAMP STACK docker build based on Ubuntu 18.04.2 Image

[ ARM / x86 ] LAMP STACK docker-based environment designed to work on either ARM architecture based systems as well as standard x86 platform. Depends on selected platform package availability may vary due to internal operating system limitations, please refer to the description below.

Utils available out of the box regardles of selected platform
  • htop
  • ncdu
  • curl
  • nano
  • wget
  • supervisor

x86 Variant consists of following packages

  1. Certbot for HTTP encryption (* SSL version only)
  2. phpMyAdmin 4.6.6
  3. MySQL 8.0.15
  4. Apache/2.4.29
  • OpenSSL
  • core_module (static)
  • so_module (static)
  • watchdog_module (static)
  • http_module (static)
  • log_config_module (static)
  • logio_module (static)
  • version_module (static)
  • unixd_module (static)
  • access_compat_module (shared)
  • alias_module (shared)
  • auth_basic_module (shared)
  • authn_core_module (shared)
  • authn_file_module (shared)
  • authz_core_module (shared)
  • authz_host_module (shared)
  • authz_user_module (shared)
  • autoindex_module (shared)
  • deflate_module (shared)
  • dir_module (shared)
  • env_module (shared)
  • filter_module (shared)
  • mime_module (shared)
  • mpm_prefork_module (shared)
  • negotiation_module (shared)
  • pagespeed_module (shared)
  • php7_module (shared)
  • reqtimeout_module (shared)
  • rewrite_module (shared)
  • setenvif_module (shared)
  • status_module (shared)
  1. PHP 7.2.15 (Laravel ready)
  • Curl 7.58.0
  • Ctype
  • GD 2.2.5
  • Imagick 3.4.3RC2
  • Pear 2.0.2
  • Zip 1.15.4
  • Mbstring 1.3.2
  • XML 2.9.4
  • JSON 1.6.0
  • mysql 5.0.12
  • OpenSSL 1.1.0g 2 Nov 2017
  • PDO 5.0.12
  • Tokenizer
  • BCMath

ARM Variant (4.20.7-sunxi armv7l) 32-bit

Apart from minor differences as listed below it has pretty much the same specs.

Known Limitations:
  • By 01/03/2019 Google Page Speed was not available for ARM microarchitecture.

  • Latest available version of MySQL for ARM based devices during that built was 5.7.25.

Quick Start

Quick start can be done by either issuing following commands or by using docker-compose files provided for each platform.

  • Data persistency can be done by passing additional "-v /docker_lamp/persist_www:/var/www/html" parameter, this command will map internal "/var/www/html" folder into "/docker_lamp/persist_www" on your local machine.
    In the same way MySQL data can be mapped by passing again "-v /docker_lamp/persist_mysql:/var/lib/mysql"

    It is entirely up to you where you want to store the data, this is just an example of how to use it.

  • By using provided docker-compose files data persistency will be turned on automatically for both MySQL and Apache.

x86 (non SSL)
$ docker run -p 3306:3306 -p 80:80 -d marekhadas9/lampstack:latest
$ docker run -p 3306:3306 -p 80:80 -d -v /docker_lamp/persist_mysql:/var/lib/mysql -v /docker_lamp/persist_www:/var/www/html marekhadas9/lampstack:latest
$ docker-compose -f /path_to_file/composeX86.yaml up
ARM (non SSL)
$ docker run -p 3306:3306 -p 80:80 -d marekhadas9/lampstack:arm
$ docker run -p 3306:3306 -p 80:80 -d -v /docker_lamp/persist_mysql:/var/lib/mysql -v /docker_lamp/persist_www:/var/www/html marekhadas9/lampstack:arm
$ docker-compose -f /path_to_file/composeARM.yaml up

Bringing up SSL to life

SSL certification process can be sorted out by using certboot tool included in SSL version of provided images. Thanks to letsencrypt you can have your own free globally trusted SSL certificate.
  1. Download composeX86ssl.yaml from my git repository and put it on your server, then run from command line.

    $ sudo su

    $ docker-compose -f composeX86Ssl.yaml up

    GitHub Logo

  2. Now it's time to identify your current unique container id.
    To do so open another terminal window and run while your container is running:

    $ sudo su

    $ docker container ls

    GitHub Logo

  3. You need to know at least first 3 characters of container id returned by above command (You can use as many characters as you wish, it is just about identifying unique container especially if there is more than one having similar container id running on your machine).

  4. Now using mentioned container id run:

    $ docker exec -it 32f bash

    Then run:

    $ certbot --apache certonly

    To issue your brand new certificate and then follow the guidelines displayed on your screen.

  5. Download /conf/default-ssl.conf from my git repository and update it accordingly to the domain name for which you were issuing certificate earlier.

  6. Put your file in /etc/default-ssl.conf

  7. Restart your container, you should be all set with SSL.

    Defaults

    * By default MySQL server binds to 0.0.0.0, server will be accessible from anywhere.

    Default MySQL users are as follows:

     U:root@'%'
     P:root  
      
     U:phpmyadmin@'localhost'
     P:9wBVSFCcyzAY
     
    

    Depends on how you are going to use your database you can either connect from localhost by using "phpmyadmin" user.

    You can also use "root" user for external connections using your server ip address or by using third party software like MySQL Workbench or HeidiSQL

    GitHub Logo

Tag summary

Content type

Image

Digest

Size

258.4 MB

Last updated

over 7 years ago

docker pull marekhadas9/lampstack:armssl