From e45d8c4abba77fbf83b68ed6803c4e7f1106fd9a Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Mon, 5 Sep 2016 06:14:20 +0800 Subject: [PATCH 01/22] Add 2.1.x branch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f49f00bf9..b0b1bff72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Fu Cheng RUN a2enmod rewrite -ENV MAGENTO_VERSION 2.0.9 +ENV MAGENTO_VERSION 2.1.1 RUN rm -rf /var/www/html/* RUN cd /tmp && curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && tar xvf $MAGENTO_VERSION.tar.gz && mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess /var/www/html From 03d526b70f79df16d15281b9a5faf33bf9cb02ce Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Fri, 7 Oct 2016 08:54:37 +1300 Subject: [PATCH 02/22] Update README.md Add documentation for referring to Magento 1.x repo --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2f9c2c907..6f92ba4e5 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,5 @@ [![Docker build](http://dockeri.co/image/alexcheng/magento2)](https://hub.docker.com/r/alexcheng/magento2/) This repo converts the [long installation guide](http://devdocs.magento.com/guides/v1.0/install-gde/bk-install-guide.html) of Magento 2 into simple Docker image to use. It uses the same convention as my [Docker image for Magento 1.x](https://github.com/alexcheng1982/docker-magento). + +For documentation, please refer to the Magento 1.x [repo](https://github.com/alexcheng1982/docker-magento). These two Docker images follow the same instructions. From d3825c660f18e63e7a369be2edb197a658f33a1a Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Wed, 25 Oct 2017 21:18:37 +1300 Subject: [PATCH 03/22] Update master branch Magento to 2.2.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b0b1bff72..708081d94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Fu Cheng RUN a2enmod rewrite -ENV MAGENTO_VERSION 2.1.1 +ENV MAGENTO_VERSION 2.2.0 RUN rm -rf /var/www/html/* RUN cd /tmp && curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && tar xvf $MAGENTO_VERSION.tar.gz && mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess /var/www/html From dee63acde29ff08a6c37d3ecb98c5a0f0e8e3c2f Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Thu, 26 Oct 2017 08:47:59 +1300 Subject: [PATCH 04/22] Update README and docker compose file Update to docker compose 3.0 --- README.md | 34 +++++++++++++++++++++++++++++++++- docker-compose-dev.yml | 14 ++++++-------- docker-compose.yml | 25 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 6f92ba4e5..24078fee1 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,36 @@ This repo converts the [long installation guide](http://devdocs.magento.com/guides/v1.0/install-gde/bk-install-guide.html) of Magento 2 into simple Docker image to use. It uses the same convention as my [Docker image for Magento 1.x](https://github.com/alexcheng1982/docker-magento). -For documentation, please refer to the Magento 1.x [repo](https://github.com/alexcheng1982/docker-magento). These two Docker images follow the same instructions. +For documentation, please refer to the Magento 1.x [repo](https://github.com/alexcheng1982/docker-magento). These two Docker images follow the same instructions. + +Below are some basic instructions. + +## Quick start + +The easiest way to start using Magento 2 is [Docker Compose](https://docs.docker.com/compose/). + +~~~ +$ docker-compose up -d +~~~ + +For admin username and password, please refer to the file `env`. You can also update the file `env` to update those configurations. + +## Installation + +### Sample data + +**Please note** Not working for Magento 2.2.0 yet. + +~~~ +$ docker exec -it install-sampledata +~~~ + +### Magento 2 + +~~~ +$ docker exec -it install-magento +~~~ + +### DB + +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:8085`. Use MySQL username and password to log in. \ No newline at end of file diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 381425ba6..dafc53b9e 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3.0' services: web: build: . @@ -10,18 +10,16 @@ services: - env db: image: mysql:5.6.23 - volumes_from: - - dbdata + volumes: + - db-data:/var/lib/mysql/data env_file: - env - dbdata: - image: alexcheng/data - volumes: - - /var/lib/mysql phpmyadmin: image: phpmyadmin/phpmyadmin container_name: phpmyadmin ports: - "8580:80" links: - - db + - db +volumes: + db-data: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..4339c7de0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.0' +services: + web: + image: alexcheng/magento2 + ports: + - "80:80" + links: + - db + env_file: + - env + db: + image: mysql:5.6.23 + volumes: + - db-data:/var/lib/mysql/data + env_file: + - env + phpmyadmin: + image: phpmyadmin/phpmyadmin + container_name: phpmyadmin + ports: + - "8580:80" + links: + - db +volumes: + db-data: \ No newline at end of file From 649398c07591c09569fd927570bc40b262ed73c9 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Thu, 26 Oct 2017 21:26:10 +1300 Subject: [PATCH 05/22] update readme to add FAQ and more docs --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 24078fee1..9728a704a 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,45 @@ Below are some basic instructions. ## Quick start -The easiest way to start using Magento 2 is [Docker Compose](https://docs.docker.com/compose/). +The easiest way to start Magento 2 with MySQL is using [Docker Compose](https://docs.docker.com/compose/). Just clone this repo and run following command in the root directory. The default `docker-compose.yml` uses MySQL and phpMyAdmin. ~~~ $ docker-compose up -d ~~~ -For admin username and password, please refer to the file `env`. You can also update the file `env` to update those configurations. +For admin username and password, please refer to the file `env`. You can also update the file `env` to update those configurations. Below are the default configurations. + +~~~ +MYSQL_HOST=db +MYSQL_ROOT_PASSWORD=myrootpassword +MYSQL_USER=magento +MYSQL_PASSWORD=magento +MYSQL_DATABASE=magento + +MAGENTO_LANGUAGE=en_GB +MAGENTO_TIMEZONE=Pacific/Auckland +MAGENTO_DEFAULT_CURRENCY=NZD +MAGENTO_URL=http://local.magento + +MAGENTO_ADMIN_FIRSTNAME=Admin +MAGENTO_ADMIN_LASTNAME=MyStore +MAGENTO_ADMIN_EMAIL=amdin@example.com +MAGENTO_ADMIN_USERNAME=admin +MAGENTO_ADMIN_PASSWORD=magentorocks1 +~~~ + +For example, if you want to change the default currency, just update the variable `MAGENTO_DEFAULT_CURRENCY`, e.g. `MAGENTO_DEFAULT_CURRENCY=USD`. ## Installation +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. + +### Magento 2 + +~~~ +$ docker exec -it install-magento +~~~ + ### Sample data **Please note** Not working for Magento 2.2.0 yet. @@ -30,12 +59,24 @@ For admin username and password, please refer to the file `env`. You can also up $ docker exec -it install-sampledata ~~~ -### Magento 2 +### Database -~~~ -$ docker exec -it install-magento -~~~ +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:8085`. Use MySQL username and password to log in. + +## FAQ + +### Where is the database? + +Magento 2 cannot run with a database. This image is for Magento 2 only. It doesn't contain MySQL server. 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. + +### Why accessing http://local.magento? + +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`. + +### How to update Magento 2 installation configurations? -### DB +Depends on how the container is used, -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:8085`. Use MySQL username and password to log in. \ No newline at end of file +* When using the GUI setup page of Magento 2, update configurations in the UI. +* When using the script, update configurations in the `env` file. +* When starting Magento 2 as a standalone container, use `-e` to pass environment variables. From 729990a31e0a7d1bf070b52ce87a96e79c2a7599 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Fri, 27 Oct 2017 01:53:04 +1300 Subject: [PATCH 06/22] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9728a704a..9e43d37e3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ This repo converts the [long installation guide](http://devdocs.magento.com/guid For documentation, please refer to the Magento 1.x [repo](https://github.com/alexcheng1982/docker-magento). These two Docker images follow the same instructions. +**Please note: this Docker image is for development and testing only, not for production use. Setting up a Magento 2 production server requires more configurations. Please refer to [official documentations](http://devdocs.magento.com/guides/v2.2/config-guide/deployment/).** + Below are some basic instructions. ## Quick start From 05a85f0e4d55374c8eaf52a12ee2dbfd8728148c Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Mon, 30 Oct 2017 12:47:42 +1300 Subject: [PATCH 07/22] Fix sample data --- Dockerfile | 2 ++ README.md | 2 -- bin/install-sampledata | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 708081d94..16ee80396 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,8 @@ RUN cd /var/www/html \ && find . -type f -exec chmod 660 {} \; \ && chmod u+x bin/magento +RUN su www-data -c "cd /var/www/html && composer config repositories.magento composer https://repo.magento.com/" + COPY ./bin/install-magento /usr/local/bin/install-magento RUN chmod +x /usr/local/bin/install-magento diff --git a/README.md b/README.md index 9e43d37e3..2f4de708b 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,6 @@ $ docker exec -it install-magento ### Sample data -**Please note** Not working for Magento 2.2.0 yet. - ~~~ $ docker exec -it install-sampledata ~~~ diff --git a/bin/install-sampledata b/bin/install-sampledata index cdb4a8e27..41e9b267a 100644 --- a/bin/install-sampledata +++ b/bin/install-sampledata @@ -8,4 +8,6 @@ ln -s ~/.composer/auth.json /var/www/html/var/composer_home/ /var/www/html/bin/magento setup:upgrade +/var/www/html/bin/magento setup:di:compile + EOSU \ No newline at end of file From 4d82a325f7c3b1d09416265a15cdce5ee42f6c14 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Mon, 30 Oct 2017 22:07:06 +1300 Subject: [PATCH 08/22] remove container name in phpmyadmin --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4339c7de0..c892036d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,6 @@ services: - env phpmyadmin: image: phpmyadmin/phpmyadmin - container_name: phpmyadmin ports: - "8580:80" links: From b278788db0789d73d4c271ab74805bfd51e6a846 Mon Sep 17 00:00:00 2001 From: Hendrik Rennefeld Date: Wed, 22 Nov 2017 20:24:38 +0100 Subject: [PATCH 09/22] upgraded to magento version 2.1 and improved some things (#7) --- Dockerfile | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16ee80396..c64a3e219 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,15 +4,20 @@ MAINTAINER Fu Cheng RUN a2enmod rewrite -ENV MAGENTO_VERSION 2.2.0 +ENV MAGENTO_VERSION 2.2.1 + +RUN rm -rf /var/www/html/* \ + && apt-get update \ + && apt-get install -y wget -RUN rm -rf /var/www/html/* RUN cd /tmp && curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && tar xvf $MAGENTO_VERSION.tar.gz && mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess /var/www/html -RUN curl -sS https://getcomposer.org/installer | php -RUN mv composer.phar /usr/local/bin/composer + +RUN curl -sS https://getcomposer.org/installer | php \ + && mv composer.phar /usr/local/bin/composer RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libpng12-dev libfreetype6-dev libicu-dev libxslt1-dev" \ - && apt-get update && apt-get install -y $requirements && rm -rf /var/lib/apt/lists/* \ + && apt-get install -y $requirements \ + && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-install pdo_mysql \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install gd \ @@ -34,7 +39,9 @@ RUN cd /var/www/html \ && find . -type f -exec chmod 660 {} \; \ && chmod u+x bin/magento -RUN su www-data -c "cd /var/www/html && composer config repositories.magento composer https://repo.magento.com/" + +RUN su www-data -c "cd /var/www/html && composer config repositories.magento composer https://repo.magento.com/" + COPY ./bin/install-magento /usr/local/bin/install-magento RUN chmod +x /usr/local/bin/install-magento @@ -46,12 +53,12 @@ RUN echo "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -WORKDIR /var/www/html - -VOLUME /var/www/html/var -VOLUME /var/www/html/pub +#Commented out the next 3 lines, because i don't see no use of this +#WORKDIR /var/www/html +#VOLUME /var/www/html/var +#VOLUME /var/www/html/pub # Add cron job ADD crontab /etc/cron.d/magento2-cron -RUN chmod 0644 /etc/cron.d/magento2-cron -RUN crontab -u www-data /etc/cron.d/magento2-cron +RUN chmod 0644 /etc/cron.d/magento2-cron \ + && crontab -u www-data /etc/cron.d/magento2-cron \ No newline at end of file From 67c73ff9acb67c589a0fc969ec8c6319c9285768 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Thu, 23 Nov 2017 10:01:54 +1300 Subject: [PATCH 10/22] Magento 2.2.1 to use php 7.1.11 tag --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c64a3e219..1581255c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alexcheng/apache2-php7 +FROM alexcheng/apache2-php7:7.1.11 MAINTAINER Fu Cheng @@ -54,7 +54,7 @@ RUN echo "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* #Commented out the next 3 lines, because i don't see no use of this -#WORKDIR /var/www/html +WORKDIR /var/www/html #VOLUME /var/www/html/var #VOLUME /var/www/html/pub From 087bcbf7708c908b6a7a7ade24aceb5c7bb22ac9 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Fri, 24 Nov 2017 08:18:13 +1300 Subject: [PATCH 11/22] Fix #9 Update phpMyAdmin url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f4de708b..7faf17fa9 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ $ docker exec -it install-sampledata ### Database -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:8085`. Use MySQL username and password to log in. +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. ## FAQ From 8ac028454c33db34b38537a849680835b8a1238a Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Thu, 21 Dec 2017 10:27:30 +1300 Subject: [PATCH 12/22] Update to Magento 2.2.2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1581255c1..c407442e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Fu Cheng RUN a2enmod rewrite -ENV MAGENTO_VERSION 2.2.1 +ENV MAGENTO_VERSION 2.2.2 RUN rm -rf /var/www/html/* \ && apt-get update \ From 748fd5562740a25cd586d1af0d6413885a048748 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Tue, 2 Jan 2018 23:00:02 +1300 Subject: [PATCH 13/22] add video --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7faf17fa9..cd58e567b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ MAGENTO_ADMIN_PASSWORD=magentorocks1 For example, if you want to change the default currency, just update the variable `MAGENTO_DEFAULT_CURRENCY`, e.g. `MAGENTO_DEFAULT_CURRENCY=USD`. +Please see the following video for a quick demo. + +[![Use Magento 2 with Docker](https://img.youtube.com/vi/18tOf_cuQKg/0.jpg)](https://www.youtube.com/watch?v=18tOf_cuQKg "Use Magento 2 with Docker") + ## Installation 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. From 629c0e5d92ba1f9d5e06c0ebf4906092d14df172 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Thu, 4 Jan 2018 20:45:09 +1300 Subject: [PATCH 14/22] update video thumbnail image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd58e567b..a2483f772 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ For example, if you want to change the default currency, just update the variabl Please see the following video for a quick demo. -[![Use Magento 2 with Docker](https://img.youtube.com/vi/18tOf_cuQKg/0.jpg)](https://www.youtube.com/watch?v=18tOf_cuQKg "Use Magento 2 with Docker") +[![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") ## Installation From 0d74ddd1eeba7b4c73504ca49edb682faef45de0 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Fri, 5 Jan 2018 08:58:18 +1300 Subject: [PATCH 15/22] Update readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a2483f772..acba5dfc0 100644 --- a/README.md +++ b/README.md @@ -84,3 +84,7 @@ Depends on how the container is used, * When using the GUI setup page of Magento 2, update configurations in the UI. * When using the script, update configurations in the `env` file. * When starting Magento 2 as a standalone container, use `-e` to pass environment variables. + +### Why getting access denied error after changing the default DB password? + +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). \ No newline at end of file From 1f34dbf74542dff7fe735530216a058d73ccca84 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Wed, 17 Jan 2018 16:28:37 +1300 Subject: [PATCH 16/22] Add readme for Magento 2.2.2 sample data issue --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index acba5dfc0..debc564c2 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ $ docker exec -it install-magento $ docker exec -it install-sampledata ~~~ +**Please note:** Sample data for Magento 2.2.2 doesn't work at the moment, see [this issue](https://github.com/alexcheng1982/docker-magento2/issues/11). + ### Database 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. From df65627146d388b4d8cbb97bc9e547f5b8bb0591 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Wed, 17 Jan 2018 20:41:09 +1300 Subject: [PATCH 17/22] Update readme for development and testing using the Docker image --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index debc564c2..aa017360c 100644 --- a/README.md +++ b/README.md @@ -89,4 +89,60 @@ Depends on how the container is used, ### Why getting access denied error after changing the default DB password? -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). \ No newline at end of file +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). + +## Develop and test using this Docker image + +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. + +### Extensions and themes + +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.yml` file. Then you can see the theme in Magento admin UI. + +```yml +version: '3.0' +services: + web: + image: alexcheng/magento2 + ports: + - "80:80" + links: + - db + env_file: + - env + volumes: + - /dev/mytheme:/var/www/html/app/design/frontend/mytheme/default + db: + image: mysql:5.6.23 + volumes: + - db-data:/var/lib/mysql/data + env_file: + - env + phpmyadmin: + image: phpmyadmin/phpmyadmin + ports: + - "8580:80" + links: + - db +volumes: + db-data: +``` + +### Modify Magento core files + +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. + +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. + +```yml +volumes: + - /dev/mycode/magento_2_2/app/code/Magento/Catalog/Block/Product/Price.php:/var/www/html/app/code/Magento/Catalog/Block/Product/Price.php +``` + +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. + +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. + +### Test Magento compatibilities + +This Docker images has different tags for corresponding Magento versions, e.g. `2.2.1`, `2.2.2`. You can switch to different Magento versions very easily when testing extensions and themes. \ No newline at end of file From 6b16f4872cf1222b6d31cd7d94a682011bc1f582 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 15 Feb 2018 07:56:26 +1300 Subject: [PATCH 18/22] update instruction for editing hosts file --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index aa017360c..6dc770348 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,12 @@ Magento 2 cannot run with a database. This image is for Magento 2 only. It doesn 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`. +If `localhost` doesn't work, try using `127.0.0.1`. + +``` +127.0.0.1 local.magento +``` + ### How to update Magento 2 installation configurations? Depends on how the container is used, From 1aefd81a04480d06a14e83b9d3b3e8d6a5f4981d Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Fri, 23 Feb 2018 07:53:14 +1300 Subject: [PATCH 19/22] Add more install options --- README.md | 8 ++++++++ bin/install-magento | 2 +- env | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dc770348..da1206f23 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ This repo converts the [long installation guide](http://devdocs.magento.com/guid For documentation, please refer to the Magento 1.x [repo](https://github.com/alexcheng1982/docker-magento). These two Docker images follow the same instructions. +__Note__ This docker image uses the *Contributing developer* profile to install Magento, so it has limitations. See more details [here](http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html). + **Please note: this Docker image is for development and testing only, not for production use. Setting up a Magento 2 production server requires more configurations. Please refer to [official documentations](http://devdocs.magento.com/guides/v2.2/config-guide/deployment/).** Below are some basic instructions. @@ -33,6 +35,10 @@ MAGENTO_LANGUAGE=en_GB MAGENTO_TIMEZONE=Pacific/Auckland MAGENTO_DEFAULT_CURRENCY=NZD MAGENTO_URL=http://local.magento +MAGENTO_BACKEND_FRONTNAME=admin +MAGENTO_USE_SECURE=0 +MAGENTO_BASE_URL_SECURE=0 +MAGENTO_USE_SECURE_ADMIN=0 MAGENTO_ADMIN_FIRSTNAME=Admin MAGENTO_ADMIN_LASTNAME=MyStore @@ -43,6 +49,8 @@ MAGENTO_ADMIN_PASSWORD=magentorocks1 For example, if you want to change the default currency, just update the variable `MAGENTO_DEFAULT_CURRENCY`, e.g. `MAGENTO_DEFAULT_CURRENCY=USD`. +You can find all available options in the official [setup guide](http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html#instgde-install-cli-magento). If you need more options, fork this repo and add them in `bin\install-magento`. + Please see the following video for a quick demo. [![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") diff --git a/bin/install-magento b/bin/install-magento index cc9e48f83..671656dbd 100644 --- a/bin/install-magento +++ b/bin/install-magento @@ -2,6 +2,6 @@ su www-data < Date: Tue, 27 Feb 2018 00:31:28 +1300 Subject: [PATCH 20/22] Add installation types - developer and integrator --- .gitignore | 1 + Dockerfile.hbs | 54 +++++++++ README.md | 6 + crontab | 2 - crontab.hbs | 3 + Dockerfile => developer/Dockerfile | 45 ++++--- developer/auth.json | 8 ++ developer/crontab | 3 + {bin => developer}/install-magento | 0 {bin => developer}/install-sampledata | 0 install-magento | 7 ++ install-sampledata | 13 +++ integrator/Dockerfile | 55 +++++++++ integrator/auth.json | 8 ++ integrator/crontab | 4 + integrator/install-magento | 7 ++ integrator/install-sampledata | 13 +++ package.json | 22 ++++ partials/developer/extraCronJobs | 0 partials/developer/magento2Installation | 8 ++ partials/integrator/extraCronJobs | 2 + partials/integrator/magento2Installation | 2 + update.js | 42 +++++++ yarn.lock | 143 +++++++++++++++++++++++ 24 files changed, 422 insertions(+), 26 deletions(-) create mode 100644 Dockerfile.hbs delete mode 100644 crontab create mode 100644 crontab.hbs rename Dockerfile => developer/Dockerfile (63%) create mode 100644 developer/auth.json create mode 100644 developer/crontab rename {bin => developer}/install-magento (100%) rename {bin => developer}/install-sampledata (100%) create mode 100644 install-magento create mode 100644 install-sampledata create mode 100644 integrator/Dockerfile create mode 100644 integrator/auth.json create mode 100644 integrator/crontab create mode 100644 integrator/install-magento create mode 100644 integrator/install-sampledata create mode 100644 package.json create mode 100644 partials/developer/extraCronJobs create mode 100644 partials/developer/magento2Installation create mode 100644 partials/integrator/extraCronJobs create mode 100644 partials/integrator/magento2Installation create mode 100644 update.js create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index c40b48396..abbbec450 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .bash_history +node_modules \ No newline at end of file diff --git a/Dockerfile.hbs b/Dockerfile.hbs new file mode 100644 index 000000000..1856b770d --- /dev/null +++ b/Dockerfile.hbs @@ -0,0 +1,54 @@ +FROM alexcheng/apache2-php7:{{phpVersion}} + +Label maintainer="alexcheng1982@gmail.com" + +ENV MAGENTO_VERSION {{magento2Version}} +ENV INSTALL_DIR /var/www/html +ENV COMPOSER_HOME /var/www/.composer/ + +RUN curl -sS https://getcomposer.org/installer | php \ + && mv composer.phar /usr/local/bin/composer +COPY ./auth.json $COMPOSER_HOME + +RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libpng12-dev libfreetype6-dev libicu-dev libxslt1-dev" \ + && apt-get update \ + && apt-get install -y $requirements \ + && rm -rf /var/lib/apt/lists/* \ + && docker-php-ext-install pdo_mysql \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install gd \ + && docker-php-ext-install mcrypt \ + && docker-php-ext-install mbstring \ + && docker-php-ext-install zip \ + && docker-php-ext-install intl \ + && docker-php-ext-install xsl \ + && docker-php-ext-install soap \ + && requirementsToRemove="libpng12-dev libmcrypt-dev libcurl3-dev libpng12-dev libfreetype6-dev libjpeg-turbo8-dev" \ + && apt-get purge --auto-remove -y $requirementsToRemove + +RUN chsh -s /bin/bash www-data + +{{{magento2Installation}}} + +RUN cd $INSTALL_DIR \ + && find . -type d -exec chmod 770 {} \; \ + && find . -type f -exec chmod 660 {} \; \ + && chmod u+x bin/magento + +COPY ./install-magento /usr/local/bin/install-magento +RUN chmod +x /usr/local/bin/install-magento + +COPY ./install-sampledata /usr/local/bin/install-sampledata +RUN chmod +x /usr/local/bin/install-sampledata + +RUN a2enmod rewrite +RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +WORKDIR $INSTALL_DIR + +# Add cron job +ADD crontab /etc/cron.d/magento2-cron +RUN chmod 0644 /etc/cron.d/magento2-cron \ + && crontab -u www-data /etc/cron.d/magento2-cron \ No newline at end of file diff --git a/README.md b/README.md index da1206f23..1b91e6136 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ __Note__ This docker image uses the *Contributing developer* profile to install **Please note: this Docker image is for development and testing only, not for production use. Setting up a Magento 2 production server requires more configurations. Please refer to [official documentations](http://devdocs.magento.com/guides/v2.2/config-guide/deployment/).** +## Magento 2 installation types + +Magento 2 has three different ways to [install](http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html), for users, integrators and developers. This Docker image uses **integrator** as the default installation type, so the **Web Setup Wizard** can be used. For each version, both integrator and developer installation types are available. The user installation type is not currently supported. + +For example, Magento 2 version `2.2.2` has tag `2.2.2`, `2.2.2-integrator` and `2.2.2-developer`. `2.2.2` is the same as `2.2.2-integrator`. + Below are some basic instructions. ## Quick start diff --git a/crontab b/crontab deleted file mode 100644 index 6b27176c4..000000000 --- a/crontab +++ /dev/null @@ -1,2 +0,0 @@ -*/1 * * * * www-data /usr/local/bin/php /var/www/html/bin/magento cron:run -*/1 * * * * www-data /usr/local/bin/php /var/www/html/bin/magento indexer:reindex diff --git a/crontab.hbs b/crontab.hbs new file mode 100644 index 000000000..a27e1aa5a --- /dev/null +++ b/crontab.hbs @@ -0,0 +1,3 @@ +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento indexer:reindex +{{{extraCronJobs}}} diff --git a/Dockerfile b/developer/Dockerfile similarity index 63% rename from Dockerfile rename to developer/Dockerfile index c407442e4..f0bfab385 100644 --- a/Dockerfile +++ b/developer/Dockerfile @@ -1,21 +1,17 @@ FROM alexcheng/apache2-php7:7.1.11 -MAINTAINER Fu Cheng - -RUN a2enmod rewrite +Label maintainer="alexcheng1982@gmail.com" ENV MAGENTO_VERSION 2.2.2 - -RUN rm -rf /var/www/html/* \ - && apt-get update \ - && apt-get install -y wget - -RUN cd /tmp && curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && tar xvf $MAGENTO_VERSION.tar.gz && mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess /var/www/html - +ENV INSTALL_DIR /var/www/html +ENV COMPOSER_HOME /var/www/.composer/ RUN curl -sS https://getcomposer.org/installer | php \ && mv composer.phar /usr/local/bin/composer +COPY ./auth.json $COMPOSER_HOME + RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libpng12-dev libfreetype6-dev libicu-dev libxslt1-dev" \ + && apt-get update \ && apt-get install -y $requirements \ && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-install pdo_mysql \ @@ -30,33 +26,34 @@ RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype && requirementsToRemove="libpng12-dev libmcrypt-dev libcurl3-dev libpng12-dev libfreetype6-dev libjpeg-turbo8-dev" \ && apt-get purge --auto-remove -y $requirementsToRemove -COPY ./auth.json /var/www/.composer/ RUN chsh -s /bin/bash www-data + +RUN cd /tmp && \ + curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && \ + tar xvf $MAGENTO_VERSION.tar.gz && \ + mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess $INSTALL_DIR + RUN chown -R www-data:www-data /var/www -RUN su www-data -c "cd /var/www/html && composer install" -RUN cd /var/www/html \ +RUN su www-data -c "cd $INSTALL_DIR && composer install" +RUN su www-data -c "cd $INSTALL_DIR && composer config repositories.magento composer https://repo.magento.com/" + +RUN cd $INSTALL_DIR \ && find . -type d -exec chmod 770 {} \; \ && find . -type f -exec chmod 660 {} \; \ && chmod u+x bin/magento - -RUN su www-data -c "cd /var/www/html && composer config repositories.magento composer https://repo.magento.com/" - - -COPY ./bin/install-magento /usr/local/bin/install-magento +COPY ./install-magento /usr/local/bin/install-magento RUN chmod +x /usr/local/bin/install-magento -COPY ./bin/install-sampledata /usr/local/bin/install-sampledata +COPY ./install-sampledata /usr/local/bin/install-sampledata RUN chmod +x /usr/local/bin/install-sampledata -RUN echo "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini +RUN a2enmod rewrite +RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -#Commented out the next 3 lines, because i don't see no use of this -WORKDIR /var/www/html -#VOLUME /var/www/html/var -#VOLUME /var/www/html/pub +WORKDIR $INSTALL_DIR # Add cron job ADD crontab /etc/cron.d/magento2-cron diff --git a/developer/auth.json b/developer/auth.json new file mode 100644 index 000000000..8506a6847 --- /dev/null +++ b/developer/auth.json @@ -0,0 +1,8 @@ + { + "http-basic": { + "repo.magento.com": { + "username": "5310458a34d580de1700dfe826ff19a1", + "password": "255059b03eb9d30604d5ef52fca7465d" + } + } +} \ No newline at end of file diff --git a/developer/crontab b/developer/crontab new file mode 100644 index 000000000..41d1c84d8 --- /dev/null +++ b/developer/crontab @@ -0,0 +1,3 @@ +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento indexer:reindex + diff --git a/bin/install-magento b/developer/install-magento similarity index 100% rename from bin/install-magento rename to developer/install-magento diff --git a/bin/install-sampledata b/developer/install-sampledata similarity index 100% rename from bin/install-sampledata rename to developer/install-sampledata diff --git a/install-magento b/install-magento new file mode 100644 index 000000000..671656dbd --- /dev/null +++ b/install-magento @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +su www-data < /usr/local/etc/php/conf.d/memory-limit.ini + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +WORKDIR $INSTALL_DIR + +# Add cron job +ADD crontab /etc/cron.d/magento2-cron +RUN chmod 0644 /etc/cron.d/magento2-cron \ + && crontab -u www-data /etc/cron.d/magento2-cron \ No newline at end of file diff --git a/integrator/auth.json b/integrator/auth.json new file mode 100644 index 000000000..8506a6847 --- /dev/null +++ b/integrator/auth.json @@ -0,0 +1,8 @@ + { + "http-basic": { + "repo.magento.com": { + "username": "5310458a34d580de1700dfe826ff19a1", + "password": "255059b03eb9d30604d5ef52fca7465d" + } + } +} \ No newline at end of file diff --git a/integrator/crontab b/integrator/crontab new file mode 100644 index 000000000..ff0100928 --- /dev/null +++ b/integrator/crontab @@ -0,0 +1,4 @@ +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento indexer:reindex +* * * * * www-data /usr/local/bin/php /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log diff --git a/integrator/install-magento b/integrator/install-magento new file mode 100644 index 000000000..671656dbd --- /dev/null +++ b/integrator/install-magento @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +su www-data <", + "license": "MIT", + "bugs": { + "url": "https://github.com/alexcheng1982/docker-magento2/issues" + }, + "homepage": "https://github.com/alexcheng1982/docker-magento2#readme", + "dependencies": { + "bluebird": "^3.5.1", + "handlebars": "^4.0.11", + "lodash.merge": "^4.6.1" + } +} diff --git a/partials/developer/extraCronJobs b/partials/developer/extraCronJobs new file mode 100644 index 000000000..e69de29bb diff --git a/partials/developer/magento2Installation b/partials/developer/magento2Installation new file mode 100644 index 000000000..45c49cef0 --- /dev/null +++ b/partials/developer/magento2Installation @@ -0,0 +1,8 @@ +RUN cd /tmp && \ + curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && \ + tar xvf $MAGENTO_VERSION.tar.gz && \ + mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess $INSTALL_DIR + +RUN chown -R www-data:www-data /var/www +RUN su www-data -c "cd $INSTALL_DIR && composer install" +RUN su www-data -c "cd $INSTALL_DIR && composer config repositories.magento composer https://repo.magento.com/" \ No newline at end of file diff --git a/partials/integrator/extraCronJobs b/partials/integrator/extraCronJobs new file mode 100644 index 000000000..05bcea3c4 --- /dev/null +++ b/partials/integrator/extraCronJobs @@ -0,0 +1,2 @@ +* * * * * www-data /usr/local/bin/php /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log +* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log \ No newline at end of file diff --git a/partials/integrator/magento2Installation b/partials/integrator/magento2Installation new file mode 100644 index 000000000..a842d6b5b --- /dev/null +++ b/partials/integrator/magento2Installation @@ -0,0 +1,2 @@ +RUN chown -R www-data:www-data /var/www +RUN su www-data -c "composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $INSTALL_DIR $MAGENTO_VERSION" \ No newline at end of file diff --git a/update.js b/update.js new file mode 100644 index 000000000..700faae16 --- /dev/null +++ b/update.js @@ -0,0 +1,42 @@ +const Handlebars = require('handlebars'); +const Promise = require('bluebird'); +const merge = require('lodash.merge'); +const fs = Promise.promisifyAll(require("fs")); +const path = require("path"); + +const commonOptions = { + phpVersion: '7.1.11', + magento2Version: '2.2.2', +}; + +function readPartial(profile, section) { + return fs.readFileAsync(path.join(__dirname, 'partials', profile, section), 'utf8'); +} + +function writeFile(context, profile, fileName, template) { + return fs.readFileAsync(path.join(__dirname, template || `${fileName}.hbs`), 'utf8') + .then(content => Handlebars.compile(content)(context)) + .then(content => fs.writeFileAsync(path.join(__dirname, profile, fileName), content)); +} + +function copyFile(fileName, profile) { + return fs.copyFileAsync(path.join(__dirname, fileName), path.join(__dirname, profile, fileName)); +} + +const profiles = ['integrator', 'developer']; +const sections = ['magento2Installation', 'extraCronJobs']; +const filesToCopy = ['auth.json', 'install-magento', 'install-sampledata']; +const templatedFiles = ['Dockerfile', 'crontab']; +Promise.map(profiles, profile => { + return Promise.reduce(sections, (obj, section) => { + return readPartial(profile, section).then(value => { + obj[section] = value; + return obj; + }) + }, {}).then(profileContext => { + const context = merge({}, commonOptions, profileContext); + return Promise.map(filesToCopy, fileToCopy => copyFile(fileToCopy, profile)) + .then(_ => Promise.map(templatedFiles, templatedFile => writeFile(context, profile, templatedFile))); + }); +}).then(() => console.log("Update successfully")) + .catch(console.error); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..34f60fb75 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,143 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +bluebird@^3.5.1: + version "3.5.1" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +decamelize@^1.0.0: + version "1.2.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +handlebars@^4.0.11: + version "4.0.11" + resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lodash.merge@^4.6.1: + version "4.6.1" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" From 4439c39ae1933b742aae6c6e505305cfd15edd13 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Fri, 16 Mar 2018 20:06:43 +1300 Subject: [PATCH 21/22] Update to Magento 2.2.3 --- developer/Dockerfile | 2 +- integrator/Dockerfile | 2 +- update.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/developer/Dockerfile b/developer/Dockerfile index f0bfab385..6c0aeb76c 100644 --- a/developer/Dockerfile +++ b/developer/Dockerfile @@ -2,7 +2,7 @@ FROM alexcheng/apache2-php7:7.1.11 Label maintainer="alexcheng1982@gmail.com" -ENV MAGENTO_VERSION 2.2.2 +ENV MAGENTO_VERSION 2.2.3 ENV INSTALL_DIR /var/www/html ENV COMPOSER_HOME /var/www/.composer/ diff --git a/integrator/Dockerfile b/integrator/Dockerfile index 61ad32ed4..cf6fb7a66 100644 --- a/integrator/Dockerfile +++ b/integrator/Dockerfile @@ -2,7 +2,7 @@ FROM alexcheng/apache2-php7:7.1.11 Label maintainer="alexcheng1982@gmail.com" -ENV MAGENTO_VERSION 2.2.2 +ENV MAGENTO_VERSION 2.2.3 ENV INSTALL_DIR /var/www/html ENV COMPOSER_HOME /var/www/.composer/ diff --git a/update.js b/update.js index 700faae16..a8dd35761 100644 --- a/update.js +++ b/update.js @@ -6,7 +6,7 @@ const path = require("path"); const commonOptions = { phpVersion: '7.1.11', - magento2Version: '2.2.2', + magento2Version: '2.2.3', }; function readPartial(profile, section) { From 97831a409ab76713cfc4e09c781230edd167c0f3 Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Tue, 20 Mar 2018 08:51:22 +1300 Subject: [PATCH 22/22] Update labels in Dockerfile --- Dockerfile.hbs | 4 +++- developer/Dockerfile | 4 +++- integrator/Dockerfile | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile.hbs b/Dockerfile.hbs index 1856b770d..c14dcf953 100644 --- a/Dockerfile.hbs +++ b/Dockerfile.hbs @@ -1,6 +1,8 @@ FROM alexcheng/apache2-php7:{{phpVersion}} -Label maintainer="alexcheng1982@gmail.com" +LABEL maintainer="alexcheng1982@gmail.com" +LABEL version="{{magento2Version}}" +LABEL description="Magento {{magento2Version}}" ENV MAGENTO_VERSION {{magento2Version}} ENV INSTALL_DIR /var/www/html diff --git a/developer/Dockerfile b/developer/Dockerfile index 6c0aeb76c..262d1e4b7 100644 --- a/developer/Dockerfile +++ b/developer/Dockerfile @@ -1,6 +1,8 @@ FROM alexcheng/apache2-php7:7.1.11 -Label maintainer="alexcheng1982@gmail.com" +LABEL maintainer="alexcheng1982@gmail.com" +LABEL version="2.2.3" +LABEL description="Magento 2.2.3" ENV MAGENTO_VERSION 2.2.3 ENV INSTALL_DIR /var/www/html diff --git a/integrator/Dockerfile b/integrator/Dockerfile index cf6fb7a66..cc3603ae0 100644 --- a/integrator/Dockerfile +++ b/integrator/Dockerfile @@ -1,6 +1,8 @@ FROM alexcheng/apache2-php7:7.1.11 -Label maintainer="alexcheng1982@gmail.com" +LABEL maintainer="alexcheng1982@gmail.com" +LABEL version="2.2.3" +LABEL description="Magento 2.2.3" ENV MAGENTO_VERSION 2.2.3 ENV INSTALL_DIR /var/www/html