Sign inSign up

davidsal/lamp-armv7

By davidsal

•Updated over 6 years ago

LAMP image for ARM32v7 (like Raspberry Pi) based on Ubuntu 18.04. (Like XAMPP but without Pearl)

Image
2

100K+

davidsal/lamp-armv7 repository overview

⁠LAMP Debian/Container

This is a rapid development container, just run the code below and you are ready to go. This only includes Apache2, PHP7.2 and MariaDB 10 (No Perl).
I do this on my spare time, so if you appreciate my work and want to support me, you can do it via paypal.me

PayPal Donation
  • Ubuntu 18.04: This container is built on top of Ubuntu 18.04. PHP, Apache and MariaDB where installed using Apt, hence its size.
  • PHP: PHP v7.2.24-0ubuntu0.18.04.6 is installed.
  • MariaDB: MariaDB v10.1.44-MariaDB-0ubuntu0.18.04.1 is installed.
  • Apache2: Apache2 v2.4.29 (Ubuntu) is installed.
  • PHPMyAdmin: PHPMyAdmin v4.6.6deb5 is installed.
  • Size: About 650MB in size due to letting APT and PHP cache enabled. Also includes MariaDB and PHPMyAdmin. This is a rapid development container after all, this allows to be up in seconds.
  • Architecture: ARM-V7. Supports Raspberry Pi and other boards.
  • Version: 2020.05.30

⁠How To Use This Image?

Web Port: This is the port to access your webpages, ex. 80. You can access your project by going into localhost:<Web Port>/www

MariaDB Port: This is the port to access your database, ex. 3006. You can access your database from your favorite database tool with localhost:<MariaDB Port>

MariaDB User: root

MariaDB Password: No password, you can leave it blank, you can later change it from PHPMyAdmin

PHPMyAdmin: You can access PHPMyAdmin by going into localhost:<Web Port>/phpmyadmin

Directory: This is the volume directory for storing your webpages (remember to create it before executing the command, otherwise, the folder will be created as Root User).

Name: This is the name of your container, by giving different ports and names, you can have multiple containers for multiple projects.

Start at boot: First, enable the docker.service with sudo systemctl enable docker.service. Then execute the code from the Tweaking section.

Run the next command, replace according your needs. After that, you can use docker start/stop.

docker run -d --tty -p <Web Port>:80 -p <MariaDB Port>:3306 -v <Directory>:/var/www/html/www --name <Name> davidsal/lamp-armv7

⁠Fixing the count(): Parameter must be an array or an object that implements Countable error:

Execute docker exec -it /bin/bash to get into the container

Run nano /usr/share/phpmyadmin/libraries/sql.lib.php

Replace (count($analyzed_sql_results['select_expr'] == 1) with (count($analyzed_sql_results['select_expr']) == 1

Restart the container and the error should go away

⁠Tweaking

Access the console: you can access it by issuing the next command:

docker exec -it <Name> /bin/bash

Entry Script: This is the script being called when starting the container, nano is installed so you can modifiy it easily.

nano /root/entry.sh Owner is user root!

Auto start on boot: If you need the container to start at machine boot, use the next code. For more restart flags, check the documentation at the next link
Start containers automatically ⁠

docker run -d --tty --restart=always -p <Web Port>:80 -p <MariaDB Port>:3306 -v <Directory>:/var/www/html/www --name <Name> davidsal/lamp-armv7

Tag summary

Content type

Image

Digest

Size

146.2 MB

Last updated

over 6 years ago

docker pull davidsal/lamp-armv7