├── .github ├── FUNDING.yml └── workflows │ └── docker-publish.yml ├── .gitignore ├── Dockerfile.hbs ├── LICENSE ├── README.md ├── auth.json ├── docker-compose.yaml.hbs ├── env ├── install-magento ├── install-sampledata ├── package.json ├── update.js ├── versions ├── 2.4.4-p6 │ ├── Dockerfile │ ├── auth.json │ ├── docker-compose.yaml │ ├── env │ ├── install-magento │ └── install-sampledata ├── 2.4.5-p5 │ ├── Dockerfile │ ├── auth.json │ ├── docker-compose.yaml │ ├── env │ ├── install-magento │ └── install-sampledata ├── 2.4.6-p3 │ ├── Dockerfile │ ├── auth.json │ ├── docker-compose.yaml │ ├── env │ ├── install-magento │ └── install-sampledata └── 2.4.6-p5 │ ├── Dockerfile │ ├── auth.json │ ├── docker-compose.yaml │ ├── env │ ├── install-magento │ └── install-sampledata └── yarn.lock /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: alexcheng1982 2 | github: alexcheng1982 -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | on: 4 | push: 5 | branches: ["master"] 6 | # Publish semver tags as releases. 7 | tags: ["v*.*.*"] 8 | pull_request: 9 | branches: ["master"] 10 | 11 | env: 12 | # Use docker.io for Docker Hub if empty 13 | REGISTRY: ghcr.io 14 | # github.repository as / 15 | IMAGE_NAME: ${{ github.repository }} 16 | 17 | jobs: 18 | build: 19 | runs-on: ubuntu-latest 20 | permissions: 21 | contents: read 22 | packages: write 23 | # This is used to complete the identity challenge 24 | # with sigstore/fulcio when running outside of PRs. 25 | id-token: write 26 | strategy: 27 | fail-fast: true 28 | matrix: 29 | version: 30 | - 2.4.6-p5 31 | 32 | steps: 33 | - name: Checkout repository 34 | uses: actions/checkout@v3 35 | 36 | # Install the cosign tool except on PR 37 | # https://github.com/sigstore/cosign-installer 38 | - name: Install cosign 39 | if: github.event_name != 'pull_request' 40 | uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 41 | with: 42 | cosign-release: "v2.1.1" 43 | 44 | # Set up BuildKit Docker container builder to be able to build 45 | # multi-platform images and export cache 46 | # https://github.com/docker/setup-buildx-action 47 | - name: Set up Docker Buildx 48 | uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 49 | 50 | # Login against a Docker registry except on PR 51 | # https://github.com/docker/login-action 52 | - name: Log into registry ${{ env.REGISTRY }} 53 | if: github.event_name != 'pull_request' 54 | uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 55 | with: 56 | registry: ${{ env.REGISTRY }} 57 | username: ${{ github.actor }} 58 | password: ${{ secrets.GITHUB_TOKEN }} 59 | 60 | # Extract metadata (tags, labels) for Docker 61 | # https://github.com/docker/metadata-action 62 | - name: Extract Docker metadata 63 | id: meta 64 | uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 65 | with: 66 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 67 | tags: | 68 | type=raw,value=${{ matrix.version }} 69 | 70 | # Build and push Docker image with Buildx (don't push on PR) 71 | # https://github.com/docker/build-push-action 72 | - name: Build and push Docker image 73 | id: build-and-push 74 | uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 75 | with: 76 | context: versions/${{ matrix.version }} 77 | push: ${{ github.event_name != 'pull_request' }} 78 | tags: ${{ steps.meta.outputs.tags }} 79 | labels: ${{ steps.meta.outputs.labels }} 80 | cache-from: type=gha 81 | cache-to: type=gha,mode=max 82 | 83 | # Sign the resulting Docker image digest except on PRs. 84 | # This will only write to the public Rekor transparency log when the Docker 85 | # repository is public to avoid leaking data. If you would like to publish 86 | # transparency data even for private images, pass --force to cosign below. 87 | # https://github.com/sigstore/cosign 88 | - name: Sign the published Docker image 89 | if: ${{ github.event_name != 'pull_request' }} 90 | env: 91 | # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable 92 | TAGS: ${{ steps.meta.outputs.tags }} 93 | DIGEST: ${{ steps.build-and-push.outputs.digest }} 94 | # This step uses the identity token to provision an ephemeral certificate 95 | # against the sigstore community Fulcio instance. 96 | run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} 97 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bash_history 2 | node_modules -------------------------------------------------------------------------------- /Dockerfile.hbs: -------------------------------------------------------------------------------- 1 | FROM {{baseImage}}:{{phpVersion}} 2 | 3 | LABEL maintainer="alexcheng1982@gmail.com" 4 | LABEL php_version="{{phpVersion}}" 5 | LABEL magento_version="{{magento2Version}}" 6 | LABEL description="Magento Open Source {{magento2Version}} with PHP {{phpVersion}}" 7 | 8 | ENV MAGENTO_VERSION {{magento2Version}} 9 | ENV INSTALL_DIR /var/www/html 10 | ENV COMPOSER_HOME /var/www/.composer/ 11 | 12 | RUN curl -sS https://getcomposer.org/installer | php {{composerInstallArgs}}\ 13 | && mv composer.phar /usr/local/bin/composer 14 | COPY ./auth.json $COMPOSER_HOME 15 | 16 | RUN requirements="libpng++-dev libzip-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libfreetype6-dev libicu-dev libxslt1-dev zip unzip libxml2 libonig-dev" \ 17 | set -eux; \ 18 | apt-get update; \ 19 | apt-get install -y $requirements; \ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | RUN set -eux; \ 23 | docker-php-ext-install pdo_mysql; \ 24 | docker-php-ext-configure gd --with-freetype --with-jpeg; \ 25 | docker-php-ext-install gd; \ 26 | docker-php-ext-install mbstring; \ 27 | docker-php-ext-install zip; \ 28 | docker-php-ext-install intl; \ 29 | docker-php-ext-install xsl; \ 30 | docker-php-ext-install soap; \ 31 | docker-php-ext-install sockets; \ 32 | docker-php-ext-install bcmath 33 | 34 | RUN yes '' | pecl install mcrypt-1.0.6 \ 35 | && echo 'extension=mcrypt.so' > /usr/local/etc/php/conf.d/mcrypt.ini 36 | 37 | RUN chsh -s /bin/bash www-data 38 | 39 | RUN chown -R www-data:www-data /var/www 40 | 41 | RUN su www-data -c "COMPOSER_MEMORY_LIMIT=-1 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $INSTALL_DIR $MAGENTO_VERSION" 42 | 43 | RUN cd $INSTALL_DIR \ 44 | && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + \ 45 | && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + \ 46 | && chown -R :www-data . \ 47 | && chmod u+x bin/magento 48 | 49 | COPY ./install-magento /usr/local/bin/install-magento 50 | RUN chmod +x /usr/local/bin/install-magento 51 | 52 | COPY ./install-sampledata /usr/local/bin/install-sampledata 53 | RUN chmod +x /usr/local/bin/install-sampledata 54 | 55 | RUN a2enmod rewrite 56 | RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini 57 | 58 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 59 | 60 | WORKDIR $INSTALL_DIR 61 | 62 | VOLUME $INSTALL_DIR -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2023 Fu Cheng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker Image for Magento Open Source 2 2 | 3 | [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/alexcheng1982) 4 | 5 | **This repo ONLY maintains Docker images for Magento Open Source 2.4.x. You may still found Docker images for old versions in the [old registry](https://quay.io/repository/alexcheng1982/magento2).** 6 | 7 | **Starting from Magento 2.4.x, container images are now hosted in [GitHub Container Registry](https://github.com/alexcheng1982/docker-magento2/pkgs/container/docker-magento2).** 8 | 9 | This repo provides Docker images for different Magento 2.4 versions. Refer to [this page](https://github.com/alexcheng1982/docker-magento2/pkgs/container/docker-magento2/versions) to see all available versions. 10 | 11 | | Version | PHP Version | Container image | 12 | | ---------- | ----------- | ------------------------------------------------ | 13 | | `2.4.6-p3` | `8.1` | `ghcr.io/alexcheng1982/docker-magento2:2.4.6-p3` | 14 | | `2.4.5-p5` | `8.1` | `ghcr.io/alexcheng1982/docker-magento2:2.4.5-p5` | 15 | | `2.4.4-p6` | `8.1` | `ghcr.io/alexcheng1982/docker-magento2:2.4.4-p6` | 16 | 17 | This docker image is based on my [docker-apache2-php8](https://github.com/alexcheng1982/docker-apache2-php8) image for Apache 2 and PHP 8. Please refer to the image label `php_version` for the actual PHP version. In general, Magento uses PHP `8.1` starting from `2.4.4`. Versions `2.4.2` and `2.4.3` use PHP `7.4`. Please refer to the label `php_version` of the image to get the actual PHP version. 18 | 19 | > This docker image is based on [phusion/baseimage-docker](https://github.com/phusion/baseimage-docker) with Ubuntu 22.04 LTS. The reason to use `phusion/baseimage-docker` is to support multiple processes, which is important to get cronjobs working in Magento. 20 | 21 | **Please note: this Docker image is for Magento 2 related development and testing only, not ready for production use. Setting up a Magento 2 production server requires more configurations. You can use this image as the base to build customized images.** 22 | 23 | ## Magento 2 Installation Types 24 | 25 | Magento 2.4 can be installed using [Composer](https://getcomposer.org/) or git. The git-based installation mode is used for contributor of Magento. This Docker image uses Composer as the installation type, so the **Web Setup Wizard** can be used. 26 | 27 | Below are some basic instructions. 28 | 29 | ## Quick Start 30 | 31 | The easiest way to start Magento 2 with MySQL is using [Docker Compose](https://docs.docker.com/compose/). Just clone this repo and run the following command in the directory of a specific version. For example, go to `versions/2.4.6-p3` for Magento `2.4.6-p3`. 32 | 33 | The default `docker-compose.yaml` uses MySQL, phpMyAdmin, and OpenSearch. 34 | 35 | ~~~ 36 | $ docker compose up -d 37 | ~~~ 38 | 39 | For admin username and password, please refer to the file `env`. You can also change the file `env` to update those configurations. Below are the default configurations. 40 | 41 | ~~~ 42 | MYSQL_HOST=db 43 | MYSQL_ROOT_PASSWORD=myrootpassword 44 | MYSQL_USER=magento 45 | MYSQL_PASSWORD=magento 46 | MYSQL_DATABASE=magento 47 | 48 | MAGENTO_LANGUAGE=en_GB 49 | MAGENTO_TIMEZONE=Pacific/Auckland 50 | MAGENTO_DEFAULT_CURRENCY=NZD 51 | MAGENTO_URL=http://local.magento 52 | MAGENTO_BACKEND_FRONTNAME=admin 53 | MAGENTO_USE_SECURE=0 54 | MAGENTO_BASE_URL_SECURE=0 55 | MAGENTO_USE_SECURE_ADMIN=0 56 | 57 | MAGENTO_ADMIN_FIRSTNAME=Admin 58 | MAGENTO_ADMIN_LASTNAME=MyStore 59 | MAGENTO_ADMIN_EMAIL=amdin@example.com 60 | MAGENTO_ADMIN_USERNAME=admin 61 | MAGENTO_ADMIN_PASSWORD=magentorocks1 62 | 63 | OPENSEARCH_HOST=opensearch 64 | ~~~ 65 | 66 | For example, if you want to change the default currency, just update the variable `MAGENTO_DEFAULT_CURRENCY`, e.g. `MAGENTO_DEFAULT_CURRENCY=USD`. 67 | 68 | To get all the possible values of `MAGENTO_LANGUAGE`, `MAGENTO_TIMEZONE` and `MAGENTO_DEFAULT_CURRENCY`, run the corresponding command shown below: 69 | 70 | | Variable | Command | 71 | | -------------------------- | -------------------------------- | 72 | | `MAGENTO_LANGUAGE` | `bin/magento info:language:list` | 73 | | `MAGENTO_TIMEZONE` | `bin/magento info:timezone:list` | 74 | | `MAGENTO_DEFAULT_CURRENCY` | `bin/magento info:currency:list` | 75 | 76 | For example, to get all possible values of `MAGENTO_LANGUAGE`, run 77 | 78 | ```bash 79 | $ docker run --rm -it ghcr.io/alexcheng1982/docker-magento2:2.4.6-p3 info:language:list 80 | ``` 81 | 82 | You can find all available options in the official [guide](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/common-cli-commands.html?lang=en). If you need more options, fork this repo and add them in `bin\install-magento`. 83 | 84 | Please see the following video for a quick demo. 85 | 86 | [![Use Magento 2 with Docker](https://img.youtube.com/vi/18tOf_cuQKg/hqdefault.jpg)](https://www.youtube.com/watch?v=18tOf_cuQKg "Use Magento 2 with Docker") 87 | 88 | ## Installation 89 | 90 | After starting the container, you'll see the setup page of Magento 2. You can use the script `install-magento` to quickly install Magento 2. The installation script uses the variables in the `env` file. Use `docker ps` to find the container name. 91 | 92 | ### Magento 2 93 | 94 | ~~~ 95 | $ docker-compose exec web install-magento 96 | ~~~ 97 | 98 | ### Sample data 99 | 100 | ~~~ 101 | $ docker-compose exec web install-sampledata 102 | ~~~ 103 | 104 | 105 | ### Database 106 | 107 | The default `docker-compose.yml` uses MySQL as the database and starts [phpMyAdmin](https://www.phpmyadmin.net/). The default URL for phpMyAdmin is `http://localhost:8580`. Use MySQL username and password to log in. 108 | 109 | MySQL `8.0.0` is used as the default database version. 110 | 111 | ### Usage 112 | 113 | After Magento 2 is installed, open a browser and navigate to `http://local.magento/`. For admin access, navigate to `http://local.magento/admin/` and log in using the admin username and password specified in the `env` file. Default admin username and password are `admin` and `magentorocks1`, respectively. Two-factor authentication is disabled. 114 | 115 | ### Running on Windows 116 | 117 | When running on Windows, the port `80` may be occupied by built-in IIS or ASP.NET server. The following command finds ID of the process that occupies port `80`. 118 | 119 | ``` 120 | netstat -ano -p TCP | find /I"listening" | find /I"80" 121 | ``` 122 | 123 | Then `taskkill /F /PID ` can be used to kill the process to free the port. 124 | 125 | ## FAQ 126 | 127 | ### How to update Magento 2 version? 128 | 129 | To update Magento 2 version, fork this repository and modify `update.js`. In the `versions` array, add a new version with Magento 2 version number and PHP version. The base image [docker-apache2-php8](https://github.com/alexcheng1982/docker-apache2-php8) has PHP versions `8.1`, `8.2`, and `8.3`. 130 | 131 | Run `update.js` using NodeJS. Files of the new version will be generated in directory `versions/`. Run `docker build` in the version's directory to build the container image. 132 | 133 | ### How to use a different port? 134 | 135 | If the default port `80` cannot be used for some reasons, you can change to a different port. Simply change the `MAGENTO_URL` from `http://local.magento` to add the port number, for example, `http://local.magento:8080`. You may also need to modify `docker-compose.yaml` file to update the exported port of the Magento container. 136 | 137 | ### How to keep installed Magento? 138 | 139 | You can add a volume to folder `/var/www/html`, see the `docker-compose.yml` file. 140 | 141 | ```yaml 142 | volumes: 143 | - magento-data:/var/www/html 144 | ``` 145 | 146 | ### Where is the database? 147 | 148 | Magento 2 cannot run without a database. This image is for Magento 2 only. It doesn't contain a MySQL server. A MySQL server should be started in another container and linked with Magento 2 container. It's recommended to use Docker Compose to start both containers. You can also use [Kubernetes](https://kubernetes.io/) or other tools. 149 | 150 | ### Why accessing http://local.magento? 151 | 152 | For development and testing in the local environment, using `localhost` as Magento 2 URL has some issues. The default `env` file use `http://local.magento` as the value of `MAGENTO_URL`. You need to [edit your `hosts` file](https://support.rackspace.com/how-to/modify-your-hosts-file/) to add the mapping from `local.magento` to `localhost`. You can use any domain names as long as it looks like a real domain, not `localhost`. 153 | 154 | If `localhost` doesn't work, try using `127.0.0.1`. 155 | 156 | ``` 157 | 127.0.0.1 local.magento 158 | ``` 159 | 160 | 161 | ### How to update Magento 2 installation configurations? 162 | 163 | Depends on how the container is used, 164 | 165 | * When using the GUI setup page of Magento 2, update configurations in the UI. 166 | * When using the script, update configurations in the `env` file. 167 | * When starting Magento 2 as a standalone container, use `-e` to pass environment variables. 168 | 169 | ### Why getting access denied error after changing the default DB password? 170 | 171 | If you change the default DB password in `env` file and get the access denied error when installing Magento 2, see [this issue comment](https://github.com/alexcheng1982/docker-magento2/issues/10#issuecomment-355382150). 172 | 173 | ## Develop and test using this Docker image 174 | 175 | As I mentioned before, this Docker image is primarily used for development and testing. Depends on the tasks you are trying to do, there are different ways to use this Docker image. 176 | 177 | ### Extensions and themes 178 | 179 | You can keep the extensions and themes directories on your local host machine, and use Docker Compose [volumes](https://docs.docker.com/compose/compose-file/#volumes) to install the extensions and themes. For example, if you have a theme in the directory `/dev/mytheme`, you can install it by specifying it in the `docker-composer.yaml` file. Then you can see the theme in Magento admin UI. 180 | 181 | ```yml 182 | version: '3.0' 183 | services: 184 | web: 185 | image: ghcr.io/alexcheng1982/docker-magento2:2.4.6-p3 186 | ports: 187 | - "80:80" 188 | links: 189 | - db 190 | env_file: 191 | - env 192 | volumes: 193 | - /dev/mytheme:/var/www/html/app/design/frontend/mytheme/default 194 | ``` 195 | 196 | ### Modify Magento core files 197 | 198 | If you want to modify Magento core files, you cannot modify them directly in the container. Those changes will be lost. It's also not recommended to update Magento core files directly, which makes upgrading Magento a painful process. Actually, Docker makes the process much easier if you absolutely need to modify some core files. You can use volumes to overwrite files. 199 | 200 | For example, if you want to overwrite the file `app/code/Magento/Catalog/Block/Product/Price.php`, you can copy the content to a new file in your local directory `/dev/mycode/magento_2_2` and make the changes, then use `volumes` to overwrite it. 201 | 202 | ```yml 203 | volumes: 204 | - /dev/mycode/magento_2_2/app/code/Magento/Catalog/Block/Product/Price.php:/var/www/html/app/code/Magento/Catalog/Block/Product/Price.php 205 | ``` 206 | 207 | By using Docker, we can make sure that all your changes to Magento core files are kept in one place and tracked in source code repository. These changes are also correctly aligned with different Magento versions. 208 | 209 | When deploying those changes to production servers, we can simply copy all files in the `/dev/mycode/magento_2_2` directory to Magento installation directory and overwrite existing files. 210 | 211 | ### Test Magento compatibilities 212 | 213 | This Docker images has different tags for corresponding Magento 2.4 versions. You can switch to different Magento versions very easily when testing extensions and themes. 214 | -------------------------------------------------------------------------------- /auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "http-basic": { 3 | "repo.magento.com": { 4 | "username": "5310458a34d580de1700dfe826ff19a1", 5 | "password": "255059b03eb9d30604d5ef52fca7465d" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /docker-compose.yaml.hbs: -------------------------------------------------------------------------------- 1 | version: '3.0' 2 | services: 3 | web: 4 | image: ghcr.io/alexcheng1982/docker-magento2:{{magento2Version}} 5 | ports: 6 | - "80:80" 7 | links: 8 | - db 9 | - opensearch 10 | depends_on: 11 | - db 12 | - opensearch 13 | volumes: 14 | - magento-data:/var/www/html 15 | env_file: 16 | - env 17 | db: 18 | image: mysql:{{mysqlVersion}} 19 | volumes: 20 | - db-data:/var/lib/mysql 21 | env_file: 22 | - env 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin 25 | ports: 26 | - "8580:80" 27 | links: 28 | - db 29 | depends_on: 30 | - db 31 | opensearch: 32 | image: opensearchproject/opensearch:{{openSearchVersion}} 33 | environment: 34 | - cluster.name=opensearch-cluster 35 | - node.name=opensearch 36 | - discovery.seed_hosts=opensearch 37 | - cluster.initial_cluster_manager_nodes=opensearch 38 | - bootstrap.memory_lock=true 39 | - plugins.security.disabled=true 40 | - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" 41 | ulimits: 42 | memlock: 43 | soft: -1 44 | hard: -1 45 | nofile: 46 | soft: 65536 47 | hard: 65536 48 | volumes: 49 | - opensearch-data:/usr/share/opensearch/data 50 | ports: 51 | - 9200:9200 52 | - 9600:9600 53 | volumes: 54 | magento-data: 55 | db-data: 56 | opensearch-data: -------------------------------------------------------------------------------- /env: -------------------------------------------------------------------------------- 1 | MYSQL_HOST=db 2 | MYSQL_ROOT_PASSWORD=myrootpassword 3 | MYSQL_USER=magento 4 | MYSQL_PASSWORD=magento 5 | MYSQL_DATABASE=magento 6 | 7 | MAGENTO_LANGUAGE=en_GB 8 | MAGENTO_TIMEZONE=Pacific/Auckland 9 | MAGENTO_DEFAULT_CURRENCY=NZD 10 | MAGENTO_URL=http://local.magento 11 | MAGENTO_BACKEND_FRONTNAME=admin 12 | MAGENTO_USE_SECURE=0 13 | MAGENTO_BASE_URL_SECURE=0 14 | MAGENTO_USE_SECURE_ADMIN=0 15 | 16 | MAGENTO_ADMIN_FIRSTNAME=Admin 17 | MAGENTO_ADMIN_LASTNAME=MyStore 18 | MAGENTO_ADMIN_EMAIL=amdin@example.com 19 | MAGENTO_ADMIN_USERNAME=admin 20 | MAGENTO_ADMIN_PASSWORD=magentorocks1 21 | 22 | OPENSEARCH_HOST=opensearch -------------------------------------------------------------------------------- /install-magento: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | su www-data <", 12 | "license": "MIT", 13 | "bugs": { 14 | "url": "https://github.com/alexcheng1982/docker-magento2/issues" 15 | }, 16 | "homepage": "https://github.com/alexcheng1982/docker-magento2#readme", 17 | "dependencies": { 18 | "bluebird": "^3.7.2", 19 | "handlebars": "^4.5.3", 20 | "lodash.merge": "^4.6.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /update.js: -------------------------------------------------------------------------------- 1 | const Handlebars = require("handlebars"); 2 | const Promise = require("bluebird"); 3 | const merge = require("lodash.merge"); 4 | const fs = Promise.promisifyAll(require("fs")); 5 | const path = require("path"); 6 | 7 | const versions = [ 8 | { 9 | baseImage: "ghcr.io/alexcheng1982/docker-apache2-php8", 10 | phpVersion: "8.1", 11 | magento2Version: "2.4.6-p5", 12 | openSearchVersion: "2", 13 | mysqlVersion: "8.0.0", 14 | composerInstallArgs: "", 15 | }, 16 | { 17 | baseImage: "ghcr.io/alexcheng1982/docker-apache2-php8", 18 | phpVersion: "8.1", 19 | magento2Version: "2.4.5-p5", 20 | openSearchVersion: "1", 21 | mysqlVersion: "8.0.0", 22 | composerInstallArgs: "", 23 | }, 24 | { 25 | baseImage: "ghcr.io/alexcheng1982/docker-apache2-php8", 26 | phpVersion: "8.1", 27 | magento2Version: "2.4.4-p6", 28 | openSearchVersion: "1", 29 | mysqlVersion: "8.0.0", 30 | composerInstallArgs: "", 31 | }, 32 | ]; 33 | 34 | function getVersionDir(version) { 35 | return path.join(__dirname, "versions", version); 36 | } 37 | 38 | function writeFile(context, version, fileName, template) { 39 | return fs 40 | .readFileAsync(path.join(__dirname, template || `${fileName}.hbs`), "utf8") 41 | .then((content) => Handlebars.compile(content)(context)) 42 | .then((content) => 43 | fs.writeFileAsync(path.join(getVersionDir(version), fileName), content) 44 | ); 45 | } 46 | 47 | function copyFile(fileName, version) { 48 | return fs.copyFileAsync( 49 | path.join(__dirname, fileName), 50 | path.join(getVersionDir(version), fileName) 51 | ); 52 | } 53 | 54 | function createVersionDir(version) { 55 | const dir = getVersionDir(version); 56 | if (!fs.existsSync(dir)) { 57 | fs.mkdirSync(dir, { recursive: true }); 58 | } 59 | } 60 | 61 | const filesToCopy = [ 62 | "auth.json", 63 | "install-magento", 64 | "install-sampledata", 65 | "env", 66 | ]; 67 | const templatedFiles = ["Dockerfile", "docker-compose.yaml"]; 68 | Promise.map(versions, (versionConfig) => { 69 | const context = merge({}, versionConfig); 70 | const version = versionConfig.magento2Version; 71 | createVersionDir(version); 72 | return Promise.map(filesToCopy, (fileToCopy) => 73 | copyFile(fileToCopy, version) 74 | ).then((_) => 75 | Promise.map(templatedFiles, (templatedFile) => 76 | writeFile(context, version, templatedFile) 77 | ) 78 | ); 79 | }) 80 | .then(() => console.log("Updated successfully")) 81 | .catch(console.error); 82 | -------------------------------------------------------------------------------- /versions/2.4.4-p6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/alexcheng1982/docker-apache2-php8:8.1 2 | 3 | LABEL maintainer="alexcheng1982@gmail.com" 4 | LABEL php_version="8.1" 5 | LABEL magento_version="2.4.4-p6" 6 | LABEL description="Magento Open Source 2.4.4-p6 with PHP 8.1" 7 | 8 | ENV MAGENTO_VERSION 2.4.4-p6 9 | ENV INSTALL_DIR /var/www/html 10 | ENV COMPOSER_HOME /var/www/.composer/ 11 | 12 | RUN curl -sS https://getcomposer.org/installer | php \ 13 | && mv composer.phar /usr/local/bin/composer 14 | COPY ./auth.json $COMPOSER_HOME 15 | 16 | RUN requirements="libpng++-dev libzip-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libfreetype6-dev libicu-dev libxslt1-dev zip unzip libxml2 libonig-dev" \ 17 | set -eux; \ 18 | apt-get update; \ 19 | apt-get install -y $requirements; \ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | RUN set -eux; \ 23 | docker-php-ext-install pdo_mysql; \ 24 | docker-php-ext-configure gd --with-freetype --with-jpeg; \ 25 | docker-php-ext-install gd; \ 26 | docker-php-ext-install mbstring; \ 27 | docker-php-ext-install zip; \ 28 | docker-php-ext-install intl; \ 29 | docker-php-ext-install xsl; \ 30 | docker-php-ext-install soap; \ 31 | docker-php-ext-install sockets; \ 32 | docker-php-ext-install bcmath 33 | 34 | RUN yes '' | pecl install mcrypt-1.0.6 \ 35 | && echo 'extension=mcrypt.so' > /usr/local/etc/php/conf.d/mcrypt.ini 36 | 37 | RUN chsh -s /bin/bash www-data 38 | 39 | RUN chown -R www-data:www-data /var/www 40 | 41 | RUN su www-data -c "COMPOSER_MEMORY_LIMIT=-1 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $INSTALL_DIR $MAGENTO_VERSION" 42 | 43 | RUN cd $INSTALL_DIR \ 44 | && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + \ 45 | && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + \ 46 | && chown -R :www-data . \ 47 | && chmod u+x bin/magento 48 | 49 | COPY ./install-magento /usr/local/bin/install-magento 50 | RUN chmod +x /usr/local/bin/install-magento 51 | 52 | COPY ./install-sampledata /usr/local/bin/install-sampledata 53 | RUN chmod +x /usr/local/bin/install-sampledata 54 | 55 | RUN a2enmod rewrite 56 | RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini 57 | 58 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 59 | 60 | WORKDIR $INSTALL_DIR 61 | 62 | VOLUME $INSTALL_DIR -------------------------------------------------------------------------------- /versions/2.4.4-p6/auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "http-basic": { 3 | "repo.magento.com": { 4 | "username": "5310458a34d580de1700dfe826ff19a1", 5 | "password": "255059b03eb9d30604d5ef52fca7465d" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /versions/2.4.4-p6/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.0' 2 | services: 3 | web: 4 | image: ghcr.io/alexcheng1982/docker-magento2:2.4.4-p6 5 | ports: 6 | - "80:80" 7 | links: 8 | - db 9 | - opensearch 10 | depends_on: 11 | - db 12 | - opensearch 13 | volumes: 14 | - magento-data:/var/www/html 15 | env_file: 16 | - env 17 | db: 18 | image: mysql:8.0.0 19 | volumes: 20 | - db-data:/var/lib/mysql 21 | env_file: 22 | - env 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin 25 | ports: 26 | - "8580:80" 27 | links: 28 | - db 29 | depends_on: 30 | - db 31 | opensearch: 32 | image: opensearchproject/opensearch:1 33 | environment: 34 | - cluster.name=opensearch-cluster 35 | - node.name=opensearch 36 | - discovery.seed_hosts=opensearch 37 | - cluster.initial_cluster_manager_nodes=opensearch 38 | - bootstrap.memory_lock=true 39 | - plugins.security.disabled=true 40 | - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" 41 | ulimits: 42 | memlock: 43 | soft: -1 44 | hard: -1 45 | nofile: 46 | soft: 65536 47 | hard: 65536 48 | volumes: 49 | - opensearch-data:/usr/share/opensearch/data 50 | ports: 51 | - 9200:9200 52 | - 9600:9600 53 | volumes: 54 | magento-data: 55 | db-data: 56 | opensearch-data: -------------------------------------------------------------------------------- /versions/2.4.4-p6/env: -------------------------------------------------------------------------------- 1 | MYSQL_HOST=db 2 | MYSQL_ROOT_PASSWORD=myrootpassword 3 | MYSQL_USER=magento 4 | MYSQL_PASSWORD=magento 5 | MYSQL_DATABASE=magento 6 | 7 | MAGENTO_LANGUAGE=en_GB 8 | MAGENTO_TIMEZONE=Pacific/Auckland 9 | MAGENTO_DEFAULT_CURRENCY=NZD 10 | MAGENTO_URL=http://local.magento 11 | MAGENTO_BACKEND_FRONTNAME=admin 12 | MAGENTO_USE_SECURE=0 13 | MAGENTO_BASE_URL_SECURE=0 14 | MAGENTO_USE_SECURE_ADMIN=0 15 | 16 | MAGENTO_ADMIN_FIRSTNAME=Admin 17 | MAGENTO_ADMIN_LASTNAME=MyStore 18 | MAGENTO_ADMIN_EMAIL=amdin@example.com 19 | MAGENTO_ADMIN_USERNAME=admin 20 | MAGENTO_ADMIN_PASSWORD=magentorocks1 21 | 22 | OPENSEARCH_HOST=opensearch -------------------------------------------------------------------------------- /versions/2.4.4-p6/install-magento: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | su www-data < /usr/local/etc/php/conf.d/mcrypt.ini 36 | 37 | RUN chsh -s /bin/bash www-data 38 | 39 | RUN chown -R www-data:www-data /var/www 40 | 41 | RUN su www-data -c "COMPOSER_MEMORY_LIMIT=-1 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $INSTALL_DIR $MAGENTO_VERSION" 42 | 43 | RUN cd $INSTALL_DIR \ 44 | && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + \ 45 | && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + \ 46 | && chown -R :www-data . \ 47 | && chmod u+x bin/magento 48 | 49 | COPY ./install-magento /usr/local/bin/install-magento 50 | RUN chmod +x /usr/local/bin/install-magento 51 | 52 | COPY ./install-sampledata /usr/local/bin/install-sampledata 53 | RUN chmod +x /usr/local/bin/install-sampledata 54 | 55 | RUN a2enmod rewrite 56 | RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini 57 | 58 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 59 | 60 | WORKDIR $INSTALL_DIR 61 | 62 | VOLUME $INSTALL_DIR -------------------------------------------------------------------------------- /versions/2.4.5-p5/auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "http-basic": { 3 | "repo.magento.com": { 4 | "username": "5310458a34d580de1700dfe826ff19a1", 5 | "password": "255059b03eb9d30604d5ef52fca7465d" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /versions/2.4.5-p5/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.0' 2 | services: 3 | web: 4 | image: ghcr.io/alexcheng1982/docker-magento2:2.4.5-p5 5 | ports: 6 | - "80:80" 7 | links: 8 | - db 9 | - opensearch 10 | depends_on: 11 | - db 12 | - opensearch 13 | volumes: 14 | - magento-data:/var/www/html 15 | env_file: 16 | - env 17 | db: 18 | image: mysql:8.0.0 19 | volumes: 20 | - db-data:/var/lib/mysql 21 | env_file: 22 | - env 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin 25 | ports: 26 | - "8580:80" 27 | links: 28 | - db 29 | depends_on: 30 | - db 31 | opensearch: 32 | image: opensearchproject/opensearch:1 33 | environment: 34 | - cluster.name=opensearch-cluster 35 | - node.name=opensearch 36 | - discovery.seed_hosts=opensearch 37 | - cluster.initial_cluster_manager_nodes=opensearch 38 | - bootstrap.memory_lock=true 39 | - plugins.security.disabled=true 40 | - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" 41 | ulimits: 42 | memlock: 43 | soft: -1 44 | hard: -1 45 | nofile: 46 | soft: 65536 47 | hard: 65536 48 | volumes: 49 | - opensearch-data:/usr/share/opensearch/data 50 | ports: 51 | - 9200:9200 52 | - 9600:9600 53 | volumes: 54 | magento-data: 55 | db-data: 56 | opensearch-data: -------------------------------------------------------------------------------- /versions/2.4.5-p5/env: -------------------------------------------------------------------------------- 1 | MYSQL_HOST=db 2 | MYSQL_ROOT_PASSWORD=myrootpassword 3 | MYSQL_USER=magento 4 | MYSQL_PASSWORD=magento 5 | MYSQL_DATABASE=magento 6 | 7 | MAGENTO_LANGUAGE=en_GB 8 | MAGENTO_TIMEZONE=Pacific/Auckland 9 | MAGENTO_DEFAULT_CURRENCY=NZD 10 | MAGENTO_URL=http://local.magento 11 | MAGENTO_BACKEND_FRONTNAME=admin 12 | MAGENTO_USE_SECURE=0 13 | MAGENTO_BASE_URL_SECURE=0 14 | MAGENTO_USE_SECURE_ADMIN=0 15 | 16 | MAGENTO_ADMIN_FIRSTNAME=Admin 17 | MAGENTO_ADMIN_LASTNAME=MyStore 18 | MAGENTO_ADMIN_EMAIL=amdin@example.com 19 | MAGENTO_ADMIN_USERNAME=admin 20 | MAGENTO_ADMIN_PASSWORD=magentorocks1 21 | 22 | OPENSEARCH_HOST=opensearch -------------------------------------------------------------------------------- /versions/2.4.5-p5/install-magento: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | su www-data < /usr/local/etc/php/conf.d/mcrypt.ini 36 | 37 | RUN chsh -s /bin/bash www-data 38 | 39 | RUN chown -R www-data:www-data /var/www 40 | 41 | RUN su www-data -c "COMPOSER_MEMORY_LIMIT=-1 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $INSTALL_DIR $MAGENTO_VERSION" 42 | 43 | RUN cd $INSTALL_DIR \ 44 | && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + \ 45 | && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + \ 46 | && chown -R :www-data . \ 47 | && chmod u+x bin/magento 48 | 49 | COPY ./install-magento /usr/local/bin/install-magento 50 | RUN chmod +x /usr/local/bin/install-magento 51 | 52 | COPY ./install-sampledata /usr/local/bin/install-sampledata 53 | RUN chmod +x /usr/local/bin/install-sampledata 54 | 55 | RUN a2enmod rewrite 56 | RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini 57 | 58 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 59 | 60 | WORKDIR $INSTALL_DIR 61 | 62 | VOLUME $INSTALL_DIR -------------------------------------------------------------------------------- /versions/2.4.6-p3/auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "http-basic": { 3 | "repo.magento.com": { 4 | "username": "5310458a34d580de1700dfe826ff19a1", 5 | "password": "255059b03eb9d30604d5ef52fca7465d" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /versions/2.4.6-p3/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.0' 2 | services: 3 | web: 4 | image: ghcr.io/alexcheng1982/docker-magento2:2.4.6-p3 5 | ports: 6 | - "80:80" 7 | links: 8 | - db 9 | - opensearch 10 | depends_on: 11 | - db 12 | - opensearch 13 | volumes: 14 | - magento-data:/var/www/html 15 | env_file: 16 | - env 17 | db: 18 | image: mysql:8.0.0 19 | volumes: 20 | - db-data:/var/lib/mysql 21 | env_file: 22 | - env 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin 25 | ports: 26 | - "8580:80" 27 | links: 28 | - db 29 | depends_on: 30 | - db 31 | opensearch: 32 | image: opensearchproject/opensearch:2 33 | environment: 34 | - cluster.name=opensearch-cluster 35 | - node.name=opensearch 36 | - discovery.seed_hosts=opensearch 37 | - cluster.initial_cluster_manager_nodes=opensearch 38 | - bootstrap.memory_lock=true 39 | - plugins.security.disabled=true 40 | - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" 41 | ulimits: 42 | memlock: 43 | soft: -1 44 | hard: -1 45 | nofile: 46 | soft: 65536 47 | hard: 65536 48 | volumes: 49 | - opensearch-data:/usr/share/opensearch/data 50 | ports: 51 | - 9200:9200 52 | - 9600:9600 53 | volumes: 54 | magento-data: 55 | db-data: 56 | opensearch-data: -------------------------------------------------------------------------------- /versions/2.4.6-p3/env: -------------------------------------------------------------------------------- 1 | MYSQL_HOST=db 2 | MYSQL_ROOT_PASSWORD=myrootpassword 3 | MYSQL_USER=magento 4 | MYSQL_PASSWORD=magento 5 | MYSQL_DATABASE=magento 6 | 7 | MAGENTO_LANGUAGE=en_GB 8 | MAGENTO_TIMEZONE=Pacific/Auckland 9 | MAGENTO_DEFAULT_CURRENCY=NZD 10 | MAGENTO_URL=http://local.magento 11 | MAGENTO_BACKEND_FRONTNAME=admin 12 | MAGENTO_USE_SECURE=0 13 | MAGENTO_BASE_URL_SECURE=0 14 | MAGENTO_USE_SECURE_ADMIN=0 15 | 16 | MAGENTO_ADMIN_FIRSTNAME=Admin 17 | MAGENTO_ADMIN_LASTNAME=MyStore 18 | MAGENTO_ADMIN_EMAIL=amdin@example.com 19 | MAGENTO_ADMIN_USERNAME=admin 20 | MAGENTO_ADMIN_PASSWORD=magentorocks1 21 | 22 | OPENSEARCH_HOST=opensearch -------------------------------------------------------------------------------- /versions/2.4.6-p3/install-magento: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | su www-data < /usr/local/etc/php/conf.d/mcrypt.ini 36 | 37 | RUN chsh -s /bin/bash www-data 38 | 39 | RUN chown -R www-data:www-data /var/www 40 | 41 | RUN su www-data -c "COMPOSER_MEMORY_LIMIT=-1 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $INSTALL_DIR $MAGENTO_VERSION" 42 | 43 | RUN cd $INSTALL_DIR \ 44 | && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + \ 45 | && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + \ 46 | && chown -R :www-data . \ 47 | && chmod u+x bin/magento 48 | 49 | COPY ./install-magento /usr/local/bin/install-magento 50 | RUN chmod +x /usr/local/bin/install-magento 51 | 52 | COPY ./install-sampledata /usr/local/bin/install-sampledata 53 | RUN chmod +x /usr/local/bin/install-sampledata 54 | 55 | RUN a2enmod rewrite 56 | RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini 57 | 58 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 59 | 60 | WORKDIR $INSTALL_DIR 61 | 62 | VOLUME $INSTALL_DIR -------------------------------------------------------------------------------- /versions/2.4.6-p5/auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "http-basic": { 3 | "repo.magento.com": { 4 | "username": "5310458a34d580de1700dfe826ff19a1", 5 | "password": "255059b03eb9d30604d5ef52fca7465d" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /versions/2.4.6-p5/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.0' 2 | services: 3 | web: 4 | image: ghcr.io/alexcheng1982/docker-magento2:2.4.6-p5 5 | ports: 6 | - "80:80" 7 | links: 8 | - db 9 | - opensearch 10 | depends_on: 11 | - db 12 | - opensearch 13 | volumes: 14 | - magento-data:/var/www/html 15 | env_file: 16 | - env 17 | db: 18 | image: mysql:8.0.0 19 | volumes: 20 | - db-data:/var/lib/mysql 21 | env_file: 22 | - env 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin 25 | ports: 26 | - "8580:80" 27 | links: 28 | - db 29 | depends_on: 30 | - db 31 | opensearch: 32 | image: opensearchproject/opensearch:2 33 | environment: 34 | - cluster.name=opensearch-cluster 35 | - node.name=opensearch 36 | - discovery.seed_hosts=opensearch 37 | - cluster.initial_cluster_manager_nodes=opensearch 38 | - bootstrap.memory_lock=true 39 | - plugins.security.disabled=true 40 | - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" 41 | ulimits: 42 | memlock: 43 | soft: -1 44 | hard: -1 45 | nofile: 46 | soft: 65536 47 | hard: 65536 48 | volumes: 49 | - opensearch-data:/usr/share/opensearch/data 50 | ports: 51 | - 9200:9200 52 | - 9600:9600 53 | volumes: 54 | magento-data: 55 | db-data: 56 | opensearch-data: -------------------------------------------------------------------------------- /versions/2.4.6-p5/env: -------------------------------------------------------------------------------- 1 | MYSQL_HOST=db 2 | MYSQL_ROOT_PASSWORD=myrootpassword 3 | MYSQL_USER=magento 4 | MYSQL_PASSWORD=magento 5 | MYSQL_DATABASE=magento 6 | 7 | MAGENTO_LANGUAGE=en_GB 8 | MAGENTO_TIMEZONE=Pacific/Auckland 9 | MAGENTO_DEFAULT_CURRENCY=NZD 10 | MAGENTO_URL=http://local.magento 11 | MAGENTO_BACKEND_FRONTNAME=admin 12 | MAGENTO_USE_SECURE=0 13 | MAGENTO_BASE_URL_SECURE=0 14 | MAGENTO_USE_SECURE_ADMIN=0 15 | 16 | MAGENTO_ADMIN_FIRSTNAME=Admin 17 | MAGENTO_ADMIN_LASTNAME=MyStore 18 | MAGENTO_ADMIN_EMAIL=amdin@example.com 19 | MAGENTO_ADMIN_USERNAME=admin 20 | MAGENTO_ADMIN_PASSWORD=magentorocks1 21 | 22 | OPENSEARCH_HOST=opensearch -------------------------------------------------------------------------------- /versions/2.4.6-p5/install-magento: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | su www-data <