awesoft / magento-docker
Magento 2 docker image
Fund package maintenance!
Buy Me A Coffee
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Shell
Type:magento2-component
pkg:composer/awesoft/magento-docker
Requires
- php: ^8.2
- magento/magento2-base: ^2.4
Conflicts
- magento/magento-cloud-docker: *
README
A lightweight, open-source Docker container for Magento2, tailored for a standard setup.
Disclaimer
- This container provides a minimal setup using
alpineLinux and theshshell, rather thanbash. - It is designed for Magento Open Source projects and might conflict with Magento ECE Tools, which also offers Docker Compose files.
Requirements
- Installed
magento2-base(or an existing Magento2 project) - PHP version 8.2
Installation
- Via Composer
composer require awesoft/magento-docker:^8.2
Usage
- The setup is designed to be straightforward. Additional configurations are optional and based on your specific needs.
- After installation via Composer, simply run
docker compose upto start all necessary services automatically. Refer todocker-compose.ymlfor details.
Files Created
docker-compose.yml- Specifies the services, volumes, and configurations to initiate your Magento2 instance..docker/mariadb- Includes configuration files for a MariaDB database instance..docker/nginx- Contains the Nginx server template configuration.
Access & Services
- Your Magento website will be accessible by default at http://magento.local/:
- Add
127.0.0.1 magento.localto your/etc/hostsfile manually. - Change the domain in
.docker/nginx/templates/default.conf.templateif needed.
- Add
- Mailcatcher: http://127.0.0.1:1080
- Opensearch: http://127.0.0.1:9200
- Redis: http://127.0.0.1:6379
- Check
docker-compose.ymlfor more information.
Additional Command and Configuration
- Use the
run-installcommand to executesetup:installwith default options, ideal for a fresh Magento project.docker compose exec -it php run-install - If successful, you can access the admin page with the following credentials:
- http://magento.local/admin/
- Username:
admin - Password:
P@ssw0rd
- By default, the
xdebugmodule is disabled. To enable it, add aXDEBUG_MODEenvironment variable in your docker-compose.yml file.