Sign inSign up

ikaruwa/lamp_base

By ikaruwa

•Updated about 1 month ago

Ubuntu 24.04 container running Laravel 13 with an integrated MySQL for all-in-one deployments

Image
Languages & frameworks
Integration & delivery
Developer tools
0

3.1K

ikaruwa/lamp_base repository overview

Publish Docker Image

⁠lamp_base - A Modern LAMP Docker Base Image

This is a generalized, all-in-one Docker image designed to support modern PHP applications (like Laravel 13+) that require a classic LAMP (Linux, Apache, MariaDB, PHP) stack.

It serves as the base layer for projects like Godzilla TCG DB⁠, abstracting away system dependencies, PHP extension compilation, and database initialization into a single reusable container.

⁠Included Components

  • Base Image: php:8.4-apache
  • Database: mariadb-server (Debian's default MySQL equivalent)
  • PHP Extensions: pdo_mysql, gd, zip, bcmath
  • Tools: composer (latest), git, unzip

⁠Features

⁠Dynamic Document Root

By default, Apache serves files from /var/www/html. You can override this dynamically in your downstream Dockerfile by setting the APACHE_DOCUMENT_ROOT environment variable:

ENV APACHE_DOCUMENT_ROOT=/var/www/public
⁠Optional MariaDB Startup

By default, the container starts MariaDB automatically. If your application relies on an external database (e.g., hosted outside the container or via another Docker Compose service), you can disable the local database startup by setting START_MYSQL to false:

ENV START_MYSQL=false

⁠Building & Usage

To use this image as a base layer for your application, reference it in your project's Dockerfile:

FROM ikaruwa/lamp_base:latest

# Set custom Apache root
ENV APACHE_DOCUMENT_ROOT=/var/www/public

# Disable local DB if using an external one
ENV START_MYSQL=false

COPY . /var/www
WORKDIR /var/www
RUN composer install

⁠CI/CD Pipeline

This repository includes a GitHub Action (.github/workflows/docker-publish.yml) that automatically builds and pushes the image to Docker Hub at ikaruwa/lamp_base:latest whenever changes are pushed to the main branch.

Tag summary

Content type

Image

Digest

sha256:722ddb1be…

Size

247.6 MB

Last updated

about 1 month ago

docker pull ikaruwa/lamp_base