Skip to content

Minimal Magento 2 Docker image built on top of Alpine Linux.

License

Notifications You must be signed in to change notification settings

jamesbrink/docker-magento

Repository files navigation

Minimal Magento 2 Docker image built on top of Alpine Linux.

Build Status Docker Automated build Docker Pulls Docker Stars

About

This is a minimal working Magento 2 Docker image built to be slim and easy to use. Checkout the [docker-compose.yml]example-compose.

Pull requests or suggestions are always welcome.

Available versions

Docker Image Size (Uncompressed) Version Dockerfile
jamesbrink/mageto:latest 348 MB Magento 2.2.3 Dockerfile
jamesbrink/mageto:2.2 348 MB Magento 2.2.3 Dockerfile
jamesbrink/mageto:2.2-sass 655 MB Magento 2.2.3 SASS Enabled Dockerfile
jamesbrink/mageto:2.2-sd 435 MB Magento 2.2.3 Sample Data Dockerfile
jamesbrink/mageto:2.2-sass-sd 742 MB Magento 2.2.3 SASS & Sample Data Dockerfile
jamesbrink/magento:2.1 328 MB Magento 2.1.12 Dockerfile
jamesbrink/magento:2.1-sd 415 MB Magento 2.1.12 Sample Data Dockerfile
jamesbrink/magento:2.0 318 MB Magento 2.0.18 Dockerfile
jamesbrink/magento:2.0-sd 409 MB Magento 2.0.18 Sample Data Dockerfile

All images are built on top of the official Alpine Linux 3.7 image, using a base image of jamesbrink/php.

There is a SASS enabled version of this package which is packaged with NodeJS as well as magento2-theme-blank-sass, and magento2-frontools. The SASS image is fairly large, but useful for development purposes.

Usage Examples

Run docker-compose example.
This will serve up the latest container and download sample data. Please not it will take a moment
to download the sample data once the container has booted.

Access the site at http://localhost/ and the admin section at http://localhost/admin/ login: admin/password1

git clone https://github.com/jamesbrink/docker-magento.git
cd docker-magento/2.2
docker-compose up

Environment Variables

Variable Default Value Description
APACHE_LOG_LEVEL warn adjusts the verbosity of the apache server which by default prints to STDOUT. Refer to the apache2 manual for all available LogLevels.
ENABLE_SAMPLE_DATA false If set to "true" the container will download and install the Magento 2 sample data on startup.