Skip to content
A full-stack LAMP environment for Docker based on Alpine
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is (kind of) a base image that can be used to create ready-to-use Docker containers running Apache, PHP 5.6 and MySQL.

This image is currently based on Alpine 3.4.

This image assumes that your project directory structure is as follows:

    - data
    - public

The data directory is used to store the MySQL data. public directory is where web-application code goes.

To build the image, run the following commands (inside the parent directory):

docker build -it protosyte/alpine-lamp .

(Mind the period at the end of the line)

To create a new container using the image, run the command:

docker run -v $(pwd)/public:/var/www/localhost/htdocs -v $(pwd)/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=changeme protosyte/alpine-lamp

Don't forget to change changeme to your desired MySQL root password. Also note that MySQL hostname is, instead of generic localhost

You can’t perform that action at this time.