Skip to content

Docker Magento 1 with PHP 7.2 (Nginx, PHP 7.2, MySQL, Alpine)

License

Notifications You must be signed in to change notification settings

javiertelioz/docker-magento-php7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image for Magento 1 (Ngnx, PHP 7.2 fpm, Mysql, Alpine)

How to use

You can use docker-compose up -d to run this image directly.

docker-compose up -d

Magento is installed into /var/www/html/code folder.

Magento installation script

A Magento installation script is also provided as /usr/local/bin/install-magento. This script can install Magento without using web UI. This script requires certain environment variables to run:

Environment variable Description Default value (used by Docker Compose - env file)
MYSQL_HOST MySQL host db
MYSQL_DATABASE MySQL db name for Magento magento
MYSQL_USER MySQL username magento
MYSQL_PASSWORD MySQL password myrootpassword
MAGENTO_LOCALE Magento locale en_US
MAGENTO_TIMEZONE Magento timezone America/New_York
MAGENTO_DEFAULT_CURRENCY Magento default currency USD
MAGENTO_URL Magento base url http://localhost:8080
MAGENTO_ADMIN_FIRSTNAME Magento admin firstname Admin
MAGENTO_ADMIN_LASTNAME Magento admin lastname MyStore
MAGENTO_ADMIN_EMAIL Magento admin email [email protected]
MAGENTO_ADMIN_USERNAME Magento admin username admin
MAGENTO_ADMIN_PASSWORD Magento admin password admin1234

Update these values in the .env file in the root directory of this repo.

More Info

After Docker container started, use docker ps to find container id or name of the then app container use docker exec to call install-magento script.

docker exec -it <container id> install-magento

ex:

docker exec -it docker-magento-php7_app_1 install-magento

After calling install-magento, Magento is installed and ready to use. Use provided admin username and password to log into Magento backend.

The store is available from http://localhost:8080/

Modman

Modman is a Magento module manager that allows you to leave your work siloed from the actual Magento codebase via symlinks. With modman, you can sync plugin or theme work without keeping a persistent volume (or using a hidden volume).

# from htdocs
modman init
modman link /path/to/plugin

And to update symlinks:

modman deploy

About

Docker Magento 1 with PHP 7.2 (Nginx, PHP 7.2, MySQL, Alpine)

Resources

License

Stars

Watchers

Forks

Packages

No packages published