{"id":20320187,"url":"https://github.com/julienloizelet/docker-magento1","last_synced_at":"2026-04-19T14:37:05.034Z","repository":{"id":107782880,"uuid":"104079431","full_name":"julienloizelet/docker-magento1","owner":"julienloizelet","description":"[DEPRECATED] Docker and docker-compose for an already existant project On Magento 1.✕","archived":false,"fork":false,"pushed_at":"2020-07-17T09:34:51.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T09:33:04.971Z","etag":null,"topics":["docker","docker-compose","magento","magento-1"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julienloizelet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-19T13:36:05.000Z","updated_at":"2020-07-17T09:45:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b9a3eeb-4134-4535-b742-bee9a9feb29d","html_url":"https://github.com/julienloizelet/docker-magento1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/julienloizelet/docker-magento1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienloizelet%2Fdocker-magento1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienloizelet%2Fdocker-magento1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienloizelet%2Fdocker-magento1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienloizelet%2Fdocker-magento1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julienloizelet","download_url":"https://codeload.github.com/julienloizelet/docker-magento1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienloizelet%2Fdocker-magento1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709977,"owners_count":24131933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","magento","magento-1"],"created_at":"2024-11-14T18:49:16.251Z","updated_at":"2026-04-19T14:37:00.011Z","avatar_url":"https://github.com/julienloizelet.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED \n\n\u003e This is no longer supported, please consider using [https://github.com/julienloizelet/docker-openmage](https://github.com/julienloizelet/docker-openmage) instead.\n\n\n\u003e Use it to manage a Magento 1 project with docker and docker-compose.\nBy \"already existant project On Magento 1.✕\", I mean a project based on Magento 1.✕ version (community or enterprise) for which you have sources and database.\n\nOriginally forked from [andreaskoch/dockerized-magento](https://github.com/andreaskoch/dockerized-magento).\n\n\n## Installing / Getting started\n\n### Requirements\n\nIf you are on Linux you should install\n\n- [docker](http://docs.docker.com/compose/install/#install-docker) and\n- [docker-compose](http://docs.docker.com/compose/install/#install-compose)\n\nIf you are running on [Mac OS](https://docs.docker.com/engine/installation/mac/) or [Windows](https://docs.docker.com/engine/installation/windows/) you can install the [Docker Toolbox](https://docs.docker.com/engine/installation/mac/) which contains docker, docker-compose and docker-machine.\n\n\nThe web-server will be bound to your local ports 80 and 443. In order to access the shop you must add a hosts file entry for `yourdomainname.local`.\n\n### Add the domain name\n\nFor Linux Users, in order to access the shop you must add the domain name \"yourdomainname.local\" to your hosts file (`/etc/hosts`).\nIf you are using docker **natively** you can use this command:\n\n```bash\nsudo su\necho \"127.0.0.1    yourdomainname.local\" \u003e\u003e /etc/hosts\n```\n \n### Get your sources ready\n We will assume sources are in a directory called `/some/path/for/your-project-sources`.\n For example, my own is `/home/julien/workspace/name-of-a-project`\n \n### Get your database ready\n   Copy a dump `yourdatabasedump.sql` in the path `data/dump`.\n\n   If you don't have an existent database, you can do a classic Magento installation. For\n   that purpose you should follow the above Installation instructions but skip the Post Installation instructions :do not create the `local.xml` file and go to the url `http://yourdomainname.local` in your favorite browser.\n\n### Installation\n\n1. Make sure you have docker and docker-compose on your system\n2. Clone the repository `git clone https://github.com/julienloizelet/docker-magento1.git`\n3. Create a  `docker-compose.override.yml` from the example `docker-compose.override.yml.dist` and make the necessary changes. (e.g replace `/some/path/for/your-project-sources` depending on your own and remove comments.) \n4. If some program are listening to port 80 or 443 (e.g apache or nginx), you must stop them. (`sudo service apache2 stop`)\n5. Start the projects using `sudo ./magento start` (maybe you will have to do a `chmod +x magento`).\n6. (optional) If you get error messages like \"permission denied\", you should run `sudo chmod -R 777 bin` and then rerun  `sudo ./magento start`.\n\nDuring the first start of the project **docker-compose** will\n\n1. first **build** all docker-images referenced in the [docker-compose.yml](docker-compose.yml)\n2. then **start** the containers\n3. and **trigger the installer** \n\nOnce the installation is finished the installer will print the URL and the credentials for the backend to the installer log:\n\n```\n...\ninstaller_1      | phpMyAdmin: http://yourdomainname.local:8081\ninstaller_1      |  - Username: root\ninstaller_1      |  - Password: pw\ninstaller_1      |\ninstaller_1      |\ninstaller_1      | Mail dev: http://yourdomainname.local:8282\ninstaller_1      |\ninstaller_1      |\ninstaller_1      | Frontend: http://yourdomainname.local/\n\n```\n\n\n**Note**: The build process and the installation process will take a while if you start the project for the first time. After that, starting and stoping the project will be a matter of seconds.\n\n## Post Installation\n\n### Import the database\n1. Create a `yourdatabase` database (a simple way is to use `phpmyadmin` by going to the url : `http://localhost:8081`)\n2. We will the import the database with the following commands (use `pw` as root password when prompted.):\n```sudo ./magento enter mysql\ncd /etc/dump\nmysql -u root -h localhost -p yourdatabase \u003c yourdatabase.sql\n```\n### Modify the `app/etc/local.xml` file\nGo to the `/some/path/for/magento/sources` and edit the `app/etc/local.xml` file with the following content (replace `yourdatabase` name by yours):\n```\n\u003c?xml version=\"1.0\"?\u003e\n\u003cconfig\u003e\n    \u003cglobal\u003e\n        \u003cinstall\u003e\n            \u003cdate\u003e\u003c![CDATA[Sat, 11 Apr 2015 12:33:05 +0000]]\u003e\u003c/date\u003e\n        \u003c/install\u003e\n        \u003ccrypt\u003e\n            \u003ckey\u003e\u003c![CDATA[731aea833710535779fe8c7c49bc6c4d]]\u003e\u003c/key\u003e\n        \u003c/crypt\u003e\n        \u003cdisable_local_modules\u003efalse\u003c/disable_local_modules\u003e\n        \u003cresources\u003e\n            \u003cdb\u003e\n                \u003ctable_prefix\u003e\u003c![CDATA[]]\u003e\u003c/table_prefix\u003e\n            \u003c/db\u003e\n            \u003cdefault_setup\u003e\n                \u003cconnection\u003e\n                    \u003chost\u003e\u003c![CDATA[mysql]]\u003e\u003c/host\u003e\n                    \u003cusername\u003e\u003c![CDATA[root]]\u003e\u003c/username\u003e\n                    \u003cpassword\u003e\u003c![CDATA[pw]]\u003e\u003c/password\u003e\n                    \u003cdbname\u003e\u003c![CDATA[yourdatabase]]\u003e\u003c/dbname\u003e\n                    \u003cinitStatements\u003e\u003c![CDATA[SET NAMES utf8]]\u003e\u003c/initStatements\u003e\n                    \u003cmodel\u003e\u003c![CDATA[mysql4]]\u003e\u003c/model\u003e\n                    \u003ctype\u003e\u003c![CDATA[pdo_mysql]]\u003e\u003c/type\u003e\n                    \u003cpdoType\u003e\u003c![CDATA[]]\u003e\u003c/pdoType\u003e\n                    \u003cactive\u003e1\u003c/active\u003e\n                \u003c/connection\u003e\n            \u003c/default_setup\u003e\n        \u003c/resources\u003e\n        \u003csession_save\u003edb\u003c/session_save\u003e\n        \u003credis_session\u003e\n            \u003chost\u003eredissession\u003c/host\u003e\n            \u003clog_level\u003e7\u003c/log_level\u003e\n            \u003cport\u003e6379\u003c/port\u003e\n            \u003cpassword\u003e\u003c/password\u003e\n            \u003ctimeout\u003e2.5\u003c/timeout\u003e\n            \u003cpersistent\u003e\u003c/persistent\u003e\n            \u003cdb\u003e0\u003c/db\u003e\n            \u003ccompression_threshold\u003e2048\u003c/compression_threshold\u003e\n            \u003ccompression_lib\u003egzip\u003c/compression_lib\u003e\n            \u003clog_level\u003e1\u003c/log_level\u003e\n            \u003cmax_concurrency\u003e6\u003c/max_concurrency\u003e\n            \u003cbreak_after_frontend\u003e5\u003c/break_after_frontend\u003e\n            \u003cbreak_after_adminhtml\u003e30\u003c/break_after_adminhtml\u003e\n            \u003cbot_lifetime\u003e7200\u003c/bot_lifetime\u003e\n            \u003cdisable_locking\u003e0\u003c/disable_locking\u003e\n        \u003c/redis_session\u003e\n        \u003ccache\u003e\n            \u003cbackend\u003eMage_Cache_Backend_Redis\u003c/backend\u003e\n            \u003cbackend_options\u003e\n                \u003cserver\u003erediscache\u003c/server\u003e\n                \u003cport\u003e6379\u003c/port\u003e\n                \u003cpersistent\u003e\u003c/persistent\u003e\n                \u003cdb\u003e0\u003c/db\u003e\n                \u003cpassword\u003e\u003c/password\u003e\n                \u003cforce_standalone\u003e0\u003c/force_standalone\u003e\n                \u003cconnect_retries\u003e1\u003c/connect_retries\u003e\n                \u003cread_timeout\u003e10\u003c/read_timeout\u003e\n                \u003cautomatic_cleaning_factor\u003e0\u003c/automatic_cleaning_factor\u003e\n                \u003ccompress_data\u003e1\u003c/compress_data\u003e\n                \u003ccompress_tags\u003e1\u003c/compress_tags\u003e\n                \u003ccompress_threshold\u003e20480\u003c/compress_threshold\u003e\n                \u003ccompression_lib\u003egzip\u003c/compression_lib\u003e\n                \u003cuse_lua\u003e0\u003c/use_lua\u003e\n            \u003c/backend_options\u003e\n        \u003c/cache\u003e\n    \u003c/global\u003e\n\u003c/config\u003e\n```\n\n## Usage\n\nYou can control the project using the built-in `magento`-script which is basically just a **wrapper for docker and docker-compose** that offers some **convenience features**:\n\n```bash\n./magento \u003caction\u003e\n```\n\n**Available Actons**\n\n- **start**: Starts the docker containers (and triggers the installation if magento is not yet installed)\n- **stop**: Stops all docker containers\n- **restart**: Restarts all docker containers and flushes the cache\n- **status**: Prints the status of all docker containers\n- **stats**: Displays live resource usage statistics of all containers\n- **magerun**: Executes magerun in the magento root directory\n- **composer**: Executes composer in the magento root directory\n- **enter**: Enters the bash of a given container type (e.g. php, mysql, ...)\n- **destroy**: Stops all containers and removes all data\n\n**Note**: The `magento`-script is just a small wrapper around `docker-compose`. You can just use [docker-compose](https://docs.docker.com/compose/) directly.\n\n## Components\n\n### Overview\n\nThe dockerized Magento project consists of the following components:\n\n- **[docker images](docker-images)**\n  1. a [PHP 5.5](docker-images/php/Dockerfile) image\n  1. a [Nginx]() image\n  1. a standard [MySQL](https://hub.docker.com/_/mysql/) database server image\n  1. multiple instances of the standard [Redis](https://hub.docker.com/_/redis/) docker image\n  1. a standard [phpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) image that allows you to access the database on port 8080\n  1. a Maildev image to prevent sending email on test environnment.\n  1. and a [Installer](docker-images/installer/Dockerfile) image which contains all tools for installing the project from scratch using an [install script](docker-images/installer/bin/install.sh)\n- a **[shell script](magento)** for controlling the project: [`./magento \u003caction\u003e`](magento)\n- and the [docker-compose.yml](docker-compose.yml)-file which connects all components\n\nIf you are interested in a **guide on how to dockerize a Magento** shop yourself you can have a look at a blog-post of Andreas Koch: [Dockerizing  Magento](https://andykdocs.de/development/Docker/Dockerize-Magento) on [AndyK Docs](https://andykdocs.de)\n\n## Custom Configuration\n\nAll parameters of the Magento installation are defined via environment variables that are set in the [docker-compose.yml](docker-compose.yml) file - if you want to tailor the Magento Shop installation to your needs you can do so **by modifying the environment variables** before you start the project.\n\nIf you have started the shop before you must **repeat the installation process** in order to apply changes:\n\n1. Modify the parameters in the `docker-compose.yml`\n2. Shutdown the containers and remove all data (`sudo ./magento destroy`)\n3. Start the containers again (`sudo ./magento start`)\n\n### Changing the domain name\n\nI set the default domain name to `yourdomainname.local`. To change the domain name replace `yourdomainname.local` with `your-domain.tld` in the `docker-compose.yml` file:\n\n```yaml\ninstaller:\n  environment:\n    DOMAIN: yourdomainname.local\n```\n\n### Change the MySQL Root User Password\n\nI chose a very weak passwords for the MySQL root-user. You can change it by modifying the respective environment variables for the **mysql-container** ... and **installer** because otherwise the installation will fail:\n\n```yaml\ninstaller:\n  environment:\n    MYSQL_PASSWORD: \u003cyour-mysql-root-user-password\u003e\nmysql:\n  environment:\n    MYSQL_ROOT_PASSWORD: \u003cyour-mysql-root-user-password\u003e\n```\n\n## Working with X-debug and Phpstorm\nHere is what I am doing to configure X-debug on Phpstorm (tested on 2016.2.2 version)\n1. First get the IP to put in your `docker-compose-override.yml` with a `ifconfig` command. (I obtain something like 10.1.156.27).\n2. Install and configure a plugin for Firefox : (i use [The easiest Xdebug](https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug/))  \n   Go to Tools-\u003eAddons-\u003eExtensions-\u003eThe easiest Xdebug and change your IDE-key : `phpstorm-xdebug`.\n3. Configure Phpstorm :\n  - Settings -\u003e Languages and Frameworks -\u003e PHP -\u003e Debug -\u003e Set the port (9000 for me)\n  - Project Settings (where are the Magento sources) -\u003e PHP -\u003e Servers : Add server configuration of your site (`host = yourdomainname.local`)\n  and add the path mapping `/some/path/for/your-project-sources` to `/var/www/html/web`\n  - Go to Run-\u003eEdit configurations. Add \"PHP Remote Debug\" configuration, select your server (that you just added) and enter an IDE-key : `phpstorm-xdebug`.\n  - Select Run-\u003eDebug... and select your remote configuration name (as you named it above)\n  \n## Working with my [Magento 1 installation based on composer](https://github.com/julienloizelet/composer-magento1.git)\n\nIf you are using composer with a repo like [mine](https://github.com/julienloizelet/composer-magento1.git) (i.e if you are me ...), beware that you have to create the `docker-compose.override.yml` with some specific volumes (see the `docker-compose.override.yml.dist` file).\nYou will then be able to run your composer commands once you will be in the `php` container :\n- On a fresh install : run the following commands : \n  - `sudo ./magento start`.\n  - `sudo ./magento enter php7`\n  - `composer install`\n- As the `htdocs` folder is created at this moment, we have to restart container in order to have a functional volume (i.e a link between `htdocs` and `/var/www/html/web`).\nSo, just run `sudo ./magento destroy` and then `sudo ./magento start` again.\n  \n## Troubleshooting\n  \n  - On first `sudo ./magento start`, you may have an error :\n`for nginx  Cannot start service nginx: oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"/bin/nginx.sh\\\": permission denied\"`\nWorkaround : before launch it again : `sudo chmod -R 777 bin`\n  - On first `sudo ./magento start`, you may have an error : `magento1_installer | /bin/install.sh: line ... Text file busy`\nWorkaround : `sudo ./magento stop` then `sudo ./magento start`\n  \n\n## Contributing\nIf you'd like to contribute, please fork the repository and use a feature\nbranch. Pull requests are warmly welcome.\nIf you found any issue, please go [there](https://github.com/julienloizelet/docker-magento1/issues).\n\n## Licensing\nThe code in this project is licensed under BSD 3-clause license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienloizelet%2Fdocker-magento1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulienloizelet%2Fdocker-magento1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienloizelet%2Fdocker-magento1/lists"}