{"id":13563770,"url":"https://github.com/alexcheng1982/docker-magento","last_synced_at":"2025-08-08T16:20:05.017Z","repository":{"id":28126824,"uuid":"31625940","full_name":"alexcheng1982/docker-magento","owner":"alexcheng1982","description":"Docker image for Magento 1.6 to 1.9","archived":false,"fork":false,"pushed_at":"2018-08-27T11:14:37.000Z","size":36211,"stargazers_count":142,"open_issues_count":9,"forks_count":101,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-08T11:09:51.828Z","etag":null,"topics":["docker-image","magento"],"latest_commit_sha":null,"homepage":"http://alexcheng1982.github.io/docker-magento","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexcheng1982.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}},"created_at":"2015-03-03T22:53:54.000Z","updated_at":"2024-09-08T11:32:32.000Z","dependencies_parsed_at":"2022-08-21T16:50:21.089Z","dependency_job_id":null,"html_url":"https://github.com/alexcheng1982/docker-magento","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcheng1982%2Fdocker-magento","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcheng1982%2Fdocker-magento/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcheng1982%2Fdocker-magento/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcheng1982%2Fdocker-magento/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexcheng1982","download_url":"https://codeload.github.com/alexcheng1982/docker-magento/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230511482,"owners_count":18237658,"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","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-image","magento"],"created_at":"2024-08-01T13:01:23.106Z","updated_at":"2024-12-19T23:15:20.425Z","avatar_url":"https://github.com/alexcheng1982.png","language":"Shell","funding_links":[],"categories":["Shell","Docker Images"],"sub_categories":["Full Page Caching"],"readme":"# Docker image for Magento 1.x\n\n[![](https://images.microbadger.com/badges/image/alexcheng/magento.svg)](http://microbadger.com/images/alexcheng/magento)\n\n[![Docker build](http://dockeri.co/image/alexcheng/magento)](https://hub.docker.com/r/alexcheng/magento/)\n\nThis repo creates a Docker image for [Magento 1.x](http://magento.com/).\n\n#### Please note\n\n\u003e The primary goal of this repo is to create Docker images for Magento 1.x development and testing, especially for extensions and themes development. It lacks essential support for production deployment, e.g. Varnish and Redis. Use this wisely for production deployment.\n\n\u003e This repo is only for Magento 1.x. If you are looking for Magento 2.x, check out [alexcheng1982/docker-magento2](https://github.com/alexcheng1982/docker-magento2).\n\n## Magento versions\n\nVersion | Git branch | Tag name\n--------| ---------- |---------\n1.9.3.8 | master     | latest\n1.9.1.1 | 1.9.1.0    | 1.9.1.0\n1.8.1.0 | 1.8.1.0    | 1.8.1.0\n1.7.0.2 | 1.7.0.2    | 1.7.0.2\n1.6.2.0 | 1.6.2.0    | 1.6.2.0\n\n## How to use\n\n### Use as standalone container\n\nYou can use `docker run` to run this image directly.\n\n```bash\ndocker run -p 80:80 alexcheng/magento\n```\n\nThen finish Magento installation using web UI. You need to have an existing MySQL server.\n\nMagento is installed into `/var/www/html` folder.\n\n### Use Docker Compose\n\n[Docker Compose](https://docs.docker.com/compose/) is the recommended way to run this image with MySQL database.\n\nA sample `docker-compose.yml` can be found in this repo.\n\n```yaml\nversion: '3.0'\n\nservices:\n  web:\n    image: alexcheng/magento\n    ports:\n      - \"80:80\"\n    links:\n      - db\n    env_file:\n      - env\n  db:\n    image: mysql:5.6.23\n    volumes:\n      - db-data:/var/lib/mysql/data\n    env_file:\n      - env\n  phpmyadmin:\n    image: phpmyadmin/phpmyadmin\n    ports:\n      - \"8580:80\"\n    links:\n      - db\nvolumes:\n  db-data:\n```\n\nThen use `docker-compose up -d` to start MySQL and Magento server.\n\n## Magento sample data\n\nInstallation script for Magento sample data is also provided.\n\n__Please note:__ Sample data must be installed __before__ Magento itself.\n\nUse `/usr/local/bin/install-sampledata` to install sample data for Magento.\n\n```bash\ndocker exec -it \u003ccontainer id\u003e install-sampledata\n```\n\nMagento 1.9 sample data is compressed version from [Vinai/compressed-magento-sample-data](https://github.com/Vinai/compressed-magento-sample-data). Magento 1.6 uses the [official sample data](http://devdocs.magento.com/guides/m1x/ce18-ee113/ht_magento-ce-sample.data.html).\n\nFor Magento 1.7 and 1.8, the sample data from 1.6 doesn't work properly as claimed in the offcial website and causes database errors, so the `install-sampledata` script is removed for 1.7 and 1.8.\n\n## Magento installation script\n\nA 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:\n\nEnvironment variable      | Description | Default value (used by Docker Compose - `env` file)\n--------------------      | ----------- | ---------------------------\nMYSQL_HOST                | MySQL host  | mysql\nMYSQL_DATABASE            | MySQL db name for Magento | magento\nMYSQL_USER                | MySQL username | magento\nMYSQL_PASSWORD            | MySQL password | magento\nMAGENTO_LOCALE            | Magento locale | en_GB\nMAGENTO_TIMEZONE          | Magento timezone |Pacific/Auckland\nMAGENTO_DEFAULT_CURRENCY  | Magento default currency | NZD\nMAGENTO_URL               | Magento base url | http://local.magento\nMAGENTO_ADMIN_FIRSTNAME   | Magento admin firstname | Admin\nMAGENTO_ADMIN_LASTNAME    | Magento admin lastname | MyStore\nMAGENTO_ADMIN_EMAIL       | Magento admin email | admin@example.com\nMAGENTO_ADMIN_USERNAME    | Magento admin username | admin\nMAGENTO_ADMIN_PASSWORD    | Magento admin password | magentorocks1\n\nIf you want to use `install-magento` script and this images is started as a standalone container using `docker run`, make sure these environment variables are passed in `docker run` with `-e` switch.\n\nAfter Docker container started, use `docker ps` to find container id of image `alexcheng/magento`, then use `docker exec` to call `install-magento` script.\n\n```bash\ndocker exec -it \u003ccontainer id\u003e install-magento\n```\n\nIf Docker Compose is used, you can just modify `env` file in the same directory of `docker-compose.yml` file to update those environment variables.\n\nAfter calling `install-magento`, Magento is installed and ready to use. Use provided admin username and password to log into Magento backend.\n\nIf you use default base url (http://local.magento) or other test url, you need to [modify your host file](http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) to map the host name to docker container. For Boot2Docker, use `boot2docker ip` to find the IP address.\n\n**Important**: If you do not use the default `MAGENTO_URL` you must use a hostname that contains a dot within it (e.g `foo.bar`), otherwise the [Magento admin panel login won't work](http://magento.stackexchange.com/a/7773).\n\n## Redis Cache\n\nIf you want to use Redis as Cache backend see comments in Dockerfile and bin/install-magento\n\n## Modman\nModman is a [Magento module manager](https://github.com/colinmollenhour/modman) 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).\n\n```bash\n# from htdocs\nmodman init\nmodman link /path/to/plugin\n```\nAnd to update symlinks:\n```bash\nmodman deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexcheng1982%2Fdocker-magento","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexcheng1982%2Fdocker-magento","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexcheng1982%2Fdocker-magento/lists"}