浏览代码

Merge branch 'master' into feature/opensearch

Mark Shust 2 年之前
父节点
当前提交
1aa6173b21
共有 54 个文件被更改,包括 581 次插入265 次删除
  1. 4 4
      .github/workflows/build-elasticsearch.yml
  2. 1 1
      .github/workflows/build-nginx.yml
  3. 1 1
      .github/workflows/build-php-7.4.yml
  4. 2 1
      .github/workflows/build-php-8.1.yml
  5. 3 2
      .github/workflows/build-php.yml
  6. 34 0
      .github/workflows/build-rabbitmq.yml
  7. 42 6
      CHANGELOG.md
  8. 177 50
      README.md
  9. 2 0
      compose/bin/analyse
  10. 1 1
      compose/bin/cli
  11. 1 1
      compose/bin/clinotty
  12. 3 3
      compose/bin/copyfromcontainer
  13. 3 3
      compose/bin/copytocontainer
  14. 1 1
      compose/bin/cron
  15. 13 0
      compose/bin/docker-compose
  16. 22 3
      compose/bin/download
  17. 1 1
      compose/bin/grunt
  18. 10 0
      compose/bin/install-php-extensions
  19. 2 0
      compose/bin/phpcbf
  20. 2 0
      compose/bin/phpcs
  21. 2 0
      compose/bin/phpcs-json-report
  22. 1 1
      compose/bin/redis
  23. 1 1
      compose/bin/remove
  24. 1 1
      compose/bin/root
  25. 1 1
      compose/bin/rootnotty
  26. 11 19
      compose/bin/setup
  27. 4 2
      compose/bin/setup-domain
  28. 23 3
      compose/bin/setup-grunt
  29. 4 4
      compose/bin/setup-ssl
  30. 2 2
      compose/bin/setup-ssl-ca
  31. 10 5
      compose/bin/start
  32. 1 1
      compose/bin/status
  33. 1 1
      compose/bin/stop
  34. 1 1
      compose/bin/update
  35. 0 0
      compose/compose.dev-linux.yaml
  36. 0 0
      compose/compose.dev-ssh.yaml
  37. 12 0
      compose/compose.dev.yaml
  38. 52 0
      compose/compose.healthcheck.yaml
  39. 18 28
      compose/compose.yaml
  40. 0 1
      compose/env/elasticsearch.env
  41. 1 0
      compose/env/phpfpm.env
  42. 0 2
      compose/env/rabbitmq.env
  43. 0 4
      images/elasticsearch/6.8/Dockerfile
  44. 5 0
      images/elasticsearch/7.16/Dockerfile
  45. 0 4
      images/elasticsearch/7.6/Dockerfile
  46. 0 4
      images/elasticsearch/7.7/Dockerfile
  47. 0 4
      images/elasticsearch/7.9/Dockerfile
  48. 12 0
      images/nginx/1.18/conf/default.conf
  49. 81 95
      images/php/7.4/Dockerfile
  50. 2 0
      images/php/7.4/conf/blackfire.ini
  51. 5 2
      images/php/8.1/Dockerfile
  52. 3 0
      images/rabbitmq/3.9/Dockerfile
  53. 1 0
      images/rabbitmq/3.9/conf/rabbitmq.conf
  54. 1 1
      lib/onelinesetup

+ 4 - 4
.github/workflows/build-elasticsearch.yml

@@ -3,7 +3,7 @@ name: build-elasticsearch
 on: workflow_dispatch
 
 jobs:
-  elasticsearch-7-9:
+  elasticsearch-7-16:
     runs-on: ubuntu-latest
     steps:
       -
@@ -26,9 +26,9 @@ jobs:
         id: docker_build
         uses: docker/build-push-action@v2
         with:
-          context: images/elasticsearch/7.9
+          context: images/elasticsearch/7.16
           platforms: linux/amd64,linux/arm64
           push: true
           tags: |
-            markoshust/magento-elasticsearch:7.9
-            markoshust/magento-elasticsearch:7.9.3-1
+            markoshust/magento-elasticsearch:7.16
+            markoshust/magento-elasticsearch:7.16-0

+ 1 - 1
.github/workflows/build-nginx.yml

@@ -31,4 +31,4 @@ jobs:
           push: true
           tags: |
             markoshust/magento-nginx:1.18
-            markoshust/magento-nginx:1.18-7
+            markoshust/magento-nginx:1.18-8

+ 1 - 1
.github/workflows/build-php-7.4.yml

@@ -31,4 +31,4 @@ jobs:
           push: true
           tags: |
             markoshust/magento-php:7.4-fpm
-            markoshust/magento-php:7.4-fpm-13
+            markoshust/magento-php:7.4-fpm-15

+ 2 - 1
.github/workflows/build-php-8.1.yml

@@ -30,4 +30,5 @@ jobs:
           platforms: linux/amd64,linux/arm64
           push: true
           tags: |
-            markoshust/magento-php:8.1-fpm-0
+            markoshust/magento-php:8.1-fpm
+            markoshust/magento-php:8.1-fpm-1

+ 3 - 2
.github/workflows/build-php.yml

@@ -31,7 +31,7 @@ jobs:
           push: true
           tags: |
             markoshust/magento-php:7.4-fpm
-            markoshust/magento-php:7.4-fpm-12
+            markoshust/magento-php:7.4-fpm-15
   php-8-1:
     runs-on: ubuntu-latest
     steps:
@@ -59,4 +59,5 @@ jobs:
           platforms: linux/amd64,linux/arm64
           push: true
           tags: |
-            markoshust/magento-php:8.1-fpm-0
+            markoshust/magento-php:8.1-fpm
+            markoshust/magento-php:8.1-fpm-1

+ 34 - 0
.github/workflows/build-rabbitmq.yml

@@ -0,0 +1,34 @@
+name: build-rabbitmq
+
+on: workflow_dispatch
+
+jobs:
+  rabbitmq-3-9:
+    runs-on: ubuntu-latest
+    steps:
+      -
+        name: Checkout
+        uses: actions/checkout@v2
+      -
+        name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+      -
+        name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+      -
+        name: Login to DockerHub
+        uses: docker/login-action@v1 
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+      -
+        name: Build and push
+        id: docker_build
+        uses: docker/build-push-action@v2
+        with:
+          context: images/rabbitmq/3.9
+          platforms: linux/amd64,linux/arm64
+          push: true
+          tags: |
+            markoshust/magento-rabbitmq:3.9
+            markoshust/magento-rabbitmq:3.9-0

+ 42 - 6
CHANGELOG.md

@@ -4,9 +4,45 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
-## [Unreleased]
+## [43.2.0] - 2022-09-13
 
-- PHP image `8.1-fpm-develop` now available for testing purposes.
+### Added
+- Added phpmyadmin to docker-compose.dev.yml file [PR #772](https://github.com/markshust/docker-magento/pull/772).
+
+## [43.1.0] - 2022-09-13
+
+### Added
+- Support for Grunt + LiveReload [#430](https://github.com/markshust/docker-magento/issues/430).
+
+## [43.0.0] - 2022-05-26
+
+### Added
+- Fall back to PHP 7.4 for Magento versions older than 2.4.4 [PR #685](https://github.com/markshust/docker-magento/pull/685) [PR #710](https://github.com/markshust/docker-magento/pull/710).
+- Checksum flag to rsync in `bin/update` [PR #707](https://github.com/markshust/docker-magento/pull/707).
+- New `bin/analyse` command to statically analyse code with PHPStan [8601c2f7](https://github.com/markshust/docker-magento/commit/8601c2f73cc6f1d2534f017c8f31eec49b0e00fc).
+- `node` & `npm` to PHP images [#694](https://github.com/markshust/docker-magento/issues/694).
+
+### Updated
+- Magento download to default to 2.4.4 [151dc09a](https://github.com/markshust/docker-magento/commit/151dc09ae95a5cff75598c366f3d77efa58098d5)
+- Prevent domain duplication in `/etc/hosts` [PR #693](https://github.com/markshust/docker-magento/pull/693).
+- Replace buster images with bullseye to properly fix Apple M1 5-sec delay [#636](https://github.com/markshust/docker-magento/issues/636).
+
+## [42.0.0] - 2022-04-14
+
+This release brings streamlined PHP Docker images (saving 300MB on previous images), a brand new PHP 8.1 image with full support for Magento 2.4.4, a proper Elasticsearch health check during setup, and ability to detect memory assigned to Docker on startup (which will prevent failed installations). Elasticsearch, Redis & RabbitMQ Docker images have also all been updated to their recently supported Magento versions.
+
+### Added
+- New Docker image for PHP 8.1 [903f9867](https://github.com/markshust/docker-magento/commit/903f9867aa130100267290feaa03b1b48b157337).
+- New Docker image for Elasticsearch 7.16 [f70a1565](https://github.com/markshust/docker-magento/commit/f70a1565bddd56a3abe8df52d4122dbcdc85d98a).
+- New Docker image for RabbitMQ 3.9 [7711365c](https://github.com/markshust/docker-magento/commit/7711365cb73aab685859e3e34fc23774937a4e2a).
+- Elasticsearch health check timeout when installing Magento [#675](https://github.com/markshust/docker-magento/pull/675).
+- Ability to detect if memory usage is too low [#527](https://github.com/markshust/docker-magento/issues/527).
+
+### Updated
+- PHP 7.4 Docker image for parity with PHP 8.1 image [481097b3](https://github.com/markshust/docker-magento/commit/481097b3f9184d19deb102b901b43af906ebb256).
+
+### Removed
+- ionCube support from PHP 7 image in order to retain Docker image parity between versions, to slim down image size, and because I no longer want to support encrypted or obfuscated code in my open source projects. Feel free to pull, fork or modify if you still need ionCube in your projects.
 
 ## [41.1.0] - 2022-03-28
 
@@ -101,7 +137,7 @@ This is one of the biggest releases of docker-magento 💥! This major update in
 
 All the images are now multi-arch builds, meaning they can install on both AMD & ARM chipsets. Additionally, by setting up your IDE to connect to Docker over SSH/SFTP to avoid selective filesystem syncing.
 
-The docker-compose configuration files have also beeen streamlined & simplified, with dedicated files for both SSH and Linux setups. Read more about these updates at https://github.com/markshust/docker-magento#ssh and https://github.com/markshust/docker-magento#linux respectively.
+The docker-compose configuration files have also been streamlined & simplified, with dedicated files for both SSH and Linux setups. Read more about these updates at https://github.com/markshust/docker-magento#ssh and https://github.com/markshust/docker-magento#linux respectively.
 
 Many issues have been resolved, and long-standing pull requests have been merged. A special thanks to [@drpayyne](https://github.com/drpayyne) for multi-arch support, [@rangerz](https://github.com/rangerz) for their massive contributions, as well as many others for their continued work & pull requests submitted to this project.
 
@@ -421,7 +457,7 @@ Happy new year! 🎉
 - Fixed logic of `bin/copyfromcontainer` and `bin/copytocontainer` so subdirectories are now properly copied from and to the container
 
 ### Added
-- The `bin/fixowns` script now includes the ability to fix ownerships at the subdirectory level 
+- The `bin/fixowns` script now includes the ability to fix ownerships at the subdirectory level
 - The `bin/copyfromcontainer` and `bin/copytocontainer` scripts now fixes permissions and ownerships of just the subdirectories that are copied
 
 ## [24.1.2] - 2019-10-15
@@ -557,7 +593,7 @@ Happy new year! 🎉
   - If you need access to specific files that are created within the container and are not host bind mounted, you can use `bin/cli` or `bin/bash` commands to go into the container to access the files. You can also use the new `bin/copyfromcontainer` and `bin/copytocontainer` bin helper scripts to copy files & folders from or to containers.
   - If you need to host bind mount files or folders, feel free to do so within the `docker-compose.dev.yml` file! Just be aware there is a performance penalty for doing so.
 - Updated `nginx` Docker image to look for `nginx.conf` file instead of `nginx.conf.sample` file. This will now require copying the `nginx.conf.sample` file to `nginx.conf`, or using a host bind mount. This location allows overrides that aren't overridden when you upgrade Magento, and allow customizations for projects. Tagged new image as `markoshust/magento-nginx:1.13-7`.
-- The `bin/setup` helper script uses ohly the `docker-compose.yml` file, with only native docker volume mounts.
+- The `bin/setup` helper script uses only the `docker-compose.yml` file, with only native docker volume mounts.
 - The `bin/start` helper script uses both `docker-compose.yml` and `docker-compose.dev.yml` files. Development-only specifications should now be placed within `docker-compose.dev.yml`, such as host bind volume mounts.
 - The `docker-compose.yml` file now uses a `sockdata` volume mount to mount the `/sock` directory. You may need to delete the `appdata` volume mount (`docker volume rm NAME`) and rebuild it with `bin/copytocontainer --all`.
 - Removed call to `bin/fixperms` within `bin/setup` to speed up initial installation.
@@ -634,7 +670,7 @@ Happy new year! 🎉
 ## [17.0.1] - 2018-10-06
 
 ### Removed
-- Removed bind mount of vendor folder introduced in 16.2.0 due to inconsistency issues. Update cominmg soon that will implement new method of bind mounting.
+- Removed bind mount of vendor folder introduced in 16.2.0 due to inconsistency issues. Update coming soon that will implement new method of bind mounting.
 
 ## [17.0.0] - 2018-09-06
 

+ 177 - 50
README.md

@@ -5,7 +5,7 @@
   <img src="https://img.shields.io/badge/magento-2.X-brightgreen.svg?logo=magento&longCache=true" alt="Supported Magento Versions" />
   <a href="https://hub.docker.com/r/markoshust/magento-php/" target="_blank"><img src="https://img.shields.io/docker/pulls/markoshust/magento-php.svg?label=php%20docker%20pulls" alt="Docker Hub Pulls - PHP" /></a>
   <a href="https://hub.docker.com/r/markoshust/magento-nginx/" target="_blank"><img src="https://img.shields.io/docker/pulls/markoshust/magento-nginx.svg?label=nginx%20docker%20pulls" alt="Docker Hub Pulls - Nginx" /></a>
-  <a href="https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity" target="_blank"><img src="https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg" alt="Maintained - Yes" /></a>
+  <a href="https://github.com/markshust/docker-magento/graphs/commit-activity" target="_blank"><img src="https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg" alt="Maintained - Yes" /></a>
   <img src="https://img.shields.io/badge/apple%20silicon%20support-yes-brightgreen" alt="Apple Silicon Support" />
   <a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/license-MIT-blue.svg" /></a>
 </div>
@@ -25,44 +25,19 @@
 
 ## Docker Hub
 
-View Dockerfiles:
+View Dockerfiles for the latest tags:
 
 - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/)
-  - 1.18
-      - [`1.18`, `1.18-7`](https://github.com/markshust/docker-magento/tree/master/images/nginx/1.18)
-      - [`1.18-6`](https://github.com/markshust/docker-magento/tree/41.0.2/images/nginx/1.18)
-      - [`1.18-5`](https://github.com/markshust/docker-magento/tree/41.0.1/images/nginx/1.18)
-      - [`1.18-4`](https://github.com/markshust/docker-magento/tree/39.1.0/images/nginx/1.18)
-      - [`1.18-3`](https://github.com/markshust/docker-magento/tree/34.0.0/images/nginx/1.18)
-      - [`1.18-2`](https://github.com/markshust/docker-magento/tree/33.0.0/images/nginx/1.18)
-      - [`1.18-1`](https://github.com/markshust/docker-magento/tree/31.0.1/images/nginx/1.18)
-      - [`1.18-0`](https://github.com/markshust/docker-magento/tree/31.0.0/images/nginx/1.18)
+  - [`1.18`, `1.18-8`](https://github.com/markshust/docker-magento/tree/master/images/nginx/1.18)
 - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/)
-  - 8.1 (available for alpha testing)
-      - [`8.1-fpm-develop`](https://github.com/markshust/docker-magento/tree/master/images/php/8.1)
-  - 7.4
-      - [`7.4-fpm`, `7.4-fpm-13`](https://github.com/markshust/docker-magento/tree/master/images/php/7.4)
-      - [`7.4-fpm-12`](https://github.com/markshust/docker-magento/tree/41.0.2/images/php/7.4)
-      - [`7.4-fpm-11`](https://github.com/markshust/docker-magento/tree/41.0.1/images/php/7.4)
-      - [`7.4-fpm-10`](https://github.com/markshust/docker-magento/tree/40.0.2/images/php/7.4)
-      - [`7.4-fpm-9`](https://github.com/markshust/docker-magento/tree/39.1.0/images/php/7.4)
-      - [`7.4-fpm-8`](https://github.com/markshust/docker-magento/tree/39.0.2/images/php/7.4)
-      - [`7.4-fpm-7`](https://github.com/markshust/docker-magento/tree/39.0.0/images/php/7.4)
-      - [`7.4-fpm-6`](https://github.com/markshust/docker-magento/tree/38.0.0/images/php/7.4)
-      - [`7.4-fpm-5`](https://github.com/markshust/docker-magento/tree/37.0.2/images/php/7.4)
-      - [`7.4-fpm-4`](https://github.com/markshust/docker-magento/tree/36.0.2/images/php/7.4)
-      - [`7.4-fpm-3`](https://github.com/markshust/docker-magento/tree/36.0.1/images/php/7.4)
-      - [`7.4-fpm-2`](https://github.com/markshust/docker-magento/tree/34.2.0/images/php/7.4)
-      - [`7.4-fpm-1`](https://github.com/markshust/docker-magento/tree/34.1.0/images/php/7.4)
-      - [`7.4-fpm-0`](https://github.com/markshust/docker-magento/tree/33.0.0/images/php/7.4)
+  - [`8.1-fpm`, `8.1-fpm-1`](https://github.com/markshust/docker-magento/tree/master/images/php/8.1)
+  - [`7.4-fpm`, `7.4-fpm-15`](https://github.com/markshust/docker-magento/tree/master/images/php/7.4)
 - [markoshust/magento-elasticsearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-elasticsearch/)
-  - 7
-      - [`7.9`, `7.9.3-1`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/7.9)
-      - [`7.9.3-0`](https://github.com/markshust/docker-magento/tree/39.1.0/images/elasticsearch/7.9)
-      - [`7.7`, `7.7.1-0`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/7.7)
-      - [`7.6`, `7.6.2-2`](https://github.com/markshust/docker-magento/tree/35.0.0/images/elasticsearch/7.6)
-      - [`7.6.2-1`](https://github.com/markshust/docker-magento/tree/32.0.0/images/elasticsearch/7.6)
-      - [`7.6.2-0`](https://github.com/markshust/docker-magento/tree/31.0.2/images/elasticsearch/7.6)
+  - [`7.16`, `7.16-0`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/7.16)
+- [markoshust/magento-rabbitmq (Docker Hub)](https://hub.docker.com/r/markoshust/magento-rabbitmq/)
+  - [`3.9`, `3.9-0`](https://github.com/markshust/docker-magento/tree/master/images/rabbitmq/3.9)
+- [markoshust/ssh (Docker Hub)](https://hub.docker.com/r/markoshust/magento-ssh/)
+  - [`latest`](https://github.com/markshust/docker-magento/tree/master/images/ssh)
 
 ## Free Course
 
@@ -77,7 +52,7 @@ A free screencast course is available (which was fully refreshed in December 202
 Set Up a Magento 2 Development Environment with Docker
 </a>
 
-### Course Curriculm
+### Course Curriculum
 
 #### Intro
 
@@ -152,10 +127,10 @@ mkdir -p ~/Sites/magento
 cd $_
 
 # Run this automated one-liner from the directory you want to install your project.
-curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.3-p1
+curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.5-p1 community
 ```
 
-The `magento.test` above defines the hostname to use, and the `2.4.3-p1` defines the Magento version to install. Note that since we need a write to `/etc/hosts` for DNS resolution, you will be prompted for your system password during setup.
+The `magento.test` above defines the hostname to use, and the `2.4.5-p1` defines the Magento version to install. Note that since we need a write to `/etc/hosts` for DNS resolution, you will be prompted for your system password during setup.
 
 After the one-liner above completes running, you should be able to access your site at `https://magento.test`.
 
@@ -183,10 +158,12 @@ cd $_
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
 
 # Download the version of Magento you want to use with:
-bin/download 2.4.3-p1
+bin/download 2.4.5-p1 community
+# You can specify the version and type (community, enterprise, or mageos).
+# If no arguments are passed, "2.4.5-p1" and "community" are the default values used.
 
 # or for Magento core development:
-# docker-compose -f docker-compose.yml up -d
+# bin/start --no-dev
 # bin/setup-composer-auth
 # bin/cli git clone git@github.com:magento/magento2.git .
 # bin/cli git checkout 2.4-develop
@@ -216,7 +193,7 @@ cp -R ~/Sites/existing src
 # or: git clone git@github.com:myrepo.git src
 
 # Start some containers, copy files to them and then restart the containers:
-docker-compose -f docker-compose.yml up -d
+bin/start --no-dev
 bin/copytocontainer --all ## Initial copy will take a few minutes...
 
 # Import existing database:
@@ -251,6 +228,7 @@ It is recommended to keep your root docker config files in one repository, and y
 
 ## Custom CLI Commands
 
+- `bin/analyse`: Run `phpstan analyse` within the container to statically analyse code, passing in directory to analyse. Ex. `bin/analyse app/code`
 - `bin/bash`: Drop into the bash prompt of your Docker container. The `phpfpm` container should be mainly used to access the filesystem within Docker.
 - `bin/cache-clean`: Access the [cache-clean](https://github.com/mage2tv/magento-cache-clean) CLI. Note the watcher is automatically started at startup in `bin/start`. Ex. `bin/cache-clean config full_page`
 - `bin/cli`: Run any CLI command without going into the bash prompt. Ex. `bin/cli ls`
@@ -262,10 +240,12 @@ It is recommended to keep your root docker config files in one repository, and y
 - `bin/cron`: Start or stop the cron service. Ex. `bin/cron start`
 - `bin/dev-urn-catalog-generate`: Generate URN's for PhpStorm and remap paths to local host. Restart PhpStorm after running this command.
 - `bin/devconsole`: Alias for `bin/n98-magerun2 dev:console`
-- `bin/download`: Download specific Magento version from Composer to the container, with an optional type of either "community" (default) or "enterprise". Ex. `bin/download 2.4.3-p1 enterprise`
+- `bin/docker-compose`: Support V1 (`docker-compose`) and V2 (`docker compose`) docker compose command, and use custom configuration files, such as `compose.yml` and `compose.dev.yml`
+- `bin/download`: Download specific Magento version from Composer to the container, with optional arguments of the version (2.4.5-p1 [default]) and type ("community" [default], "enterprise", or "mageos"). Ex. `bin/download 2.4.5-p1 enterprise`
 - `bin/fixowns`: This will fix filesystem ownerships within the container.
 - `bin/fixperms`: This will fix filesystem permissions within the container.
 - `bin/grunt`: Run the grunt binary. Ex. `bin/grunt exec`
+- `bin/install-php-extensions`: Install PHP extension in the container. Ex. `bin/install-php-extensions sourceguardian`
 - `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush`
 - `bin/mftf`: Run the Magento MFTF. Ex: `bin/mftf build:project`
 - `bin/mysql`: Run the MySQL CLI with database config from `env/db.env`. Ex. `bin/mysql -e "EXPLAIN core_config_data"` or`bin/mysql < magento.sql`
@@ -273,6 +253,9 @@ It is recommended to keep your root docker config files in one repository, and y
 - `bin/n98-magerun2`: Access the [n98-magerun2](https://github.com/netz98/n98-magerun2) CLI. Ex: `bin/n98-magerun2 dev:console`
 - `bin/node`: Run the node binary. Ex. `bin/node --version`
 - `bin/npm`: Run the npm binary. Ex. `bin/npm install`
+- `bin/phpcbf`: Auto-fix PHP_CodeSniffer errors with Magento2 options. Ex. `bin/phpcbf <path-to-extension>`
+- `bin/phpcs`: Run PHP_CodeSniffer with Magento2 options. Ex. `bin/phpcs <path-to-extension>`
+- `bin/phpcs-json-report`: Run PHP_CodeSniffer with Magento2 options and save to `report.json` file. Ex. `bin/phpcs-json-report <path-to-extension>`
 - `bin/pwa-studio`: (BETA) Start the PWA Studio server. Note that Chrome will throw SSL cert errors and not allow you to view the site, but Firefox will.
 - `bin/redis`: Run a command from the redis container. Ex. `bin/redis redis-cli monitor`
 - `bin/remove`: Remove all containers.
@@ -297,6 +280,28 @@ It is recommended to keep your root docker config files in one repository, and y
 
 ## Misc Info
 
+### Install fails because project directory is not empty
+
+The most common issue with a failed docker-magento install is getting this error:
+
+```
+Project directory "/var/www/html/." is not empty error
+```
+
+This message occurs when _something_ fails to execute correctly during an install, and a subsequent install is re-attempted. Unfortunately, when attempting a second (or third) install, it's possible the `src` directory is no longer empty. This prevents Composer from creating the new project because it needs to create new projects within an empty directory.
+
+The workaround to this is that once you have fixed the issue that was initially preventing your install from completing, you will need to completely remove the assets from the previously attempted install before attempting a subsequent install.
+
+You can do this by running:
+
+```
+bin/removeall
+cd ..
+rm -rf yourproject
+```
+
+Then, create your new project directory again so you can attempt the install process again. The `bin/removeall` command removes all previous Docker containers & volumes related to the specific project directory you are within. You can then attempt the install process again.
+
 ### Caching
 
 For an improved developer experience, caches are automatically refreshed when related files are updated, courtesy of [cache-clean](https://github.com/mage2tv/magento-cache-clean). This means you can keep all of the standard Magento caches enabled, and this script will only clear the specific caches needed, and only when necessary.
@@ -305,7 +310,7 @@ To disable this functionality, uncomment the last line in the `bin/start` file t
 
 ### Database
 
-The hostname of each service is the name of the service within the `docker-compose.yml` file. So for example, MySQL's hostname is `db` (not `localhost`) when accessing it from within a Docker container. Elasticsearch's hostname is `elasticsearch`.
+The hostname of each service is the name of the service within the `compose.yaml` file. So for example, MySQL's hostname is `db` (not `localhost`) when accessing it from within a Docker container. Elasticsearch's hostname is `elasticsearch`.
 
 To connect to the MySQL CLI tool of the Docker instance, run:
 
@@ -342,7 +347,7 @@ Copy `src/auth.json.sample` to `src/auth.json`. Then, update the username and pa
 
 ### Email / Mailcatcher
 
-View emails sent locally through Mailcatcher by visiting [http://{yourdomain}:1080](http://{yourdomain}:1080). During development, it's easiest to test emails using a third-party module such as [https://github.com/mageplaza/magento-2-smtp](Mageplaza's SMTP module). Set the mailserver host to `mailcatcher` and port to `1080`.
+View emails sent locally through Mailcatcher by visiting [http://{yourdomain}:1080](http://{yourdomain}:1080). During development, it's easiest to test emails using a third-party module such as [Mageplaza's SMTP module](https://github.com/mageplaza/magento-2-smtp). In order to use mailcatcher, set the mailserver host to `mailcatcher` and set port to `1025`. Note that this port is different from the mailcatcher interface to read the emails.
 
 ### Redis
 
@@ -366,12 +371,71 @@ You may also monitor Redis by running: `bin/redis redis-cli monitor`
 
 For more information about Redis usage with Magento, <a href="https://devdocs.magento.com/guides/v2.4/config-guide/redis/redis-session.html" target="_blank">see the DevDocs</a>.
 
+### PhpMyAdmin
+
+PhpMyAdmin is built into the `compose.dev.yaml` file. Simply open `http://localhost:8080` in a web browser.
+
 ### Xdebug & VS Code
 
 Install and enable the PHP Debug extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug).
 
 Otherwise, this project now automatically sets up Xdebug support with VS Code. If you wish to set this up manually, please see the [`.vscode/launch.json`](https://github.com/markshust/docker-magento/blame/master/compose/.vscode/launch.json) file.
 
+### Xdebug & VS Code in a WSL2 environment
+
+Install and enable the PHP Debug extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug).
+
+Otherwise, this project now automatically sets up Xdebug support with VS Code. If you wish to set this up manually, please see the [`.vscode/launch.json`](https://github.com/markshust/docker-magento/blame/master/compose/.vscode/launch.json) file.
+
+1. In VS Code, make sure that it's running in a WSL window, rather than in the default window.
+2. Install the [`PHP Debug`](https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug) extension on VS Code.
+3. Create a new configuration file inside the project. Go to the `Run and Debug` section in VS Code, then click on `create a launch.json file`.
+4. Attention to the following configs inside the file:
+    * The port must be the same as the port on the xdebug.ini file.
+    ```bash
+      bin/cli cat /usr/local/etc/php/php.ini
+    ```
+    ```bash
+      memory_limit = 4G
+      max_execution_time = 1800
+      zlib.output_compression = On
+      cgi.fix_pathinfo = 0
+      date.timezone = UTC
+
+      xdebug.mode = debug
+      xdebug.client_host = host.docker.internal
+      xdebug.idekey = PHPSTORM
+      xdebug.client_port=9003
+      #You can uncomment the following line to force the debug with each request
+      #xdebug.start_with_request=yes
+
+      upload_max_filesize = 100M
+      post_max_size = 100M
+      max_input_vars = 10000
+    ```
+    * The pathMappings should have the same folder path as the project inside the Docker container.
+    ```json
+      {
+          "version": "0.2.0",
+          "configurations": [
+              {
+                  "name": "Listen for XDebug",
+                  "type": "php",
+                  "request": "launch",
+                  "port": 9003,
+                  "pathMappings": {
+                      "/var/www/html": "${workspaceFolder}"
+                  },
+                  "hostname": "localhost"
+              }
+          ]
+      }
+    ```
+5. Run the following command in the Windows Powershell. It allows WSL through the firewall, otherwise breakpoints might not be hitten.
+    ```powershell
+    New-NetFirewallRule -DisplayName "WSL" -Direction Inbound  -InterfaceAlias "vEthernet (WSL)"  -Action Allow
+    ```
+
 ### Xdebug & PhpStorm
 
 1.  First, install the [Chrome Xdebug helper](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc). After installed, right click on the Chrome icon for it and go to Options. Under IDE Key, select PhpStorm from the list to set the IDE Key to "PHPSTORM", then click Save.
@@ -384,7 +448,7 @@ Otherwise, this project now automatically sets up Xdebug support with VS Code. I
         * Create a new interpreter from the `From Docker, Vagrant, VM...` list.
         * Select the Docker Compose option.
         * For Server, select `Docker`. If you don't have Docker set up as a server, create one and name it `Docker`.
-        * For Configuration files, add both the `docker-compose.yml` and `docker-compose.dev.yml` files from your project directory.
+        * For Configuration files, add both the `compose.yaml` and `compose.dev.yaml` files from your project directory.
         * For Service, select `phpfpm`, then click OK.
         * Name this CLI Interpreter `phpfpm`, then click OK again.
 
@@ -417,7 +481,7 @@ Otherwise, this project now automatically sets up Xdebug support with VS Code. I
 
 Since version `40.0.0`, this project supports connecting to Docker with SSH/SFTP. This means that if you solely use either PhpStorm or VSCode, you no longer need to selectively mount host volumes in order to gain bi-directional sync capabilities from host to container. This will enable full speed in the native filesystem, as all files will be stored directly in the `appdata` container volume, rather than being synced from the host. This is especially useful if you'd like to sync larger directories such as `generated`, `pub` & `vendor`.
 
-Copy `docker-compose.dev-ssh.yml` to `docker-compose.dev.yml` before installing Magento to take advantage of this setup. Then, create an SFTP connection at  Preferences -> Build, Execution, Deployment -> Deployment. Connect to `localhost` and use `app` for the username & password. You can set additional options for working with Magento in PhpStorm at Preferences -> Build, Execution, Deployment -> Deployment -> Options.
+Copy `compose.dev-ssh.yaml` to `compose.dev.yaml` before installing Magento to take advantage of this setup. Then, create an SFTP connection at  Preferences -> Build, Execution, Deployment -> Deployment. Connect to `localhost` and use `app` for the username & password. You can set additional options for working with Magento in PhpStorm at Preferences -> Build, Execution, Deployment -> Deployment -> Options.
 
 Note that you must use your IDE's SSH/SFTP functionality, otherwise changes will not be synced. To re-sync your host environment at any time, run:
 
@@ -429,13 +493,13 @@ bin/copyfromcontainer --all
 
 Running Docker on Linux should be pretty straight-forward. Note that you need to run some [post install commands](https://docs.docker.com/install/linux/linux-postinstall/) as well as [installing Docker Compose](https://docs.docker.com/compose/install/) before continuing. These steps are taken care of automatically with Docker Desktop, but not on Linux.
 
-Copy `docker-compose.dev-linux.yml` to `docker-compose.dev.yml` before installing Magento to take advantage of this setup.
+Copy `compose.dev-linux.yaml` to `compose.dev.yaml` before installing Magento to take advantage of this setup.
 
 #### The host.docker.internal hostname
 
 The `host.docker.internal` hostname is used on Docker for Mac/Windows to reference the Docker daemon. On Linux, this hostname does not exist.
 
-This hostname is [hard-coded in the php.ini file](https://github.com/markshust/docker-magento/blob/master/images/php/7.4/conf/php.ini#L8). To make this hostname resolve, add `"host.docker.internal:172.17.0.1"` to the `app.extra_hosts` parameter of `docker-compose.yml`, replacing `172.17.0.1` with the result of:
+This hostname is [hard-coded in the php.ini file](https://github.com/markshust/docker-magento/blob/master/images/php/7.4/conf/php.ini#L8). To make this hostname resolve, add `"host.docker.internal:172.17.0.1"` to the `app.extra_hosts` parameter of `compose.yaml`, replacing `172.17.0.1` with the result of:
 
 ```
 docker run --rm alpine ip route | awk 'NR==1 {print $3}'
@@ -481,10 +545,10 @@ Finally, restart the containers with `bin/restart`. After doing so, everything i
 
 ### MFTF
 
-To work with MFTF you will need to first enable the `selenium` image in the `docker-compose.dev.yml` file. Then, you will need to run the following.
+To work with MFTF you will need to first enable the `selenium` image in the `compose.dev.yaml` file. Then, you will need to run the following.
 
 1. Run mftf build process `bin/mftf build:project`. This should build the basic setup for mftf in your project.
-2. Update the `extra_host` values to match your Magento URL and IP in `docker-compose.dev.yml`.
+2. Update the `extra_host` values to match your Magento URL and IP in `compose.dev.yaml`.
 3. Update the values in `src/dev/tests/acceptance/.env`, including adding the new line `SELENIUM_HOST=selenium` to define the host Codeception should connect to.
 4. Run a sample test `bin/mftf run:test AdminLoginSuccessfulTest`.
 5. Update your `nginx.conf` file to allow access to the dev section with the following, before the final `deny all` section:
@@ -508,6 +572,69 @@ For debugging, you can connect to the selenium image using a VCN client.
 
 Find more info [here](https://devdocs.magento.com/mftf/docs/getting-started.html) about mftf configuration.
 
+### Grunt + LiveReload for Frontend Development
+
+#### Create a new theme and make it active
+
+Create your new theme at `app/design/frontend/VendorName/theme-name`, with the related `composer.json`, `registration.php` and `theme.xml` files.
+
+Make your new theme active at Admin > Content > Design > Configuration. Click the Edit button next to Global Scope, and set the Applied Theme to your new theme name, and click Save Configuration.
+
+#### Load the LiveReload client file
+
+To create a connection to LiveReload, you'll need to insert the LiveReload script into your theme. You can do this by creating a file in your theme at `Magento_Theme/layout/default_head_blocks.xml` with the contents:
+
+```xml
+<?xml version="1.0"?>
+<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
+    <head>
+        <script defer="true" src="/livereload.js?port=443" src_type="url"/>
+    </head>
+</page>
+```
+
+The "?port=443" parameter is important, otherwise the `livereload.js` script won't work.
+
+While we're at it, let's also create an initial LESS file so we have something to test. Create a new file in your theme at `web/css/source/_extend.less` with the contents:
+
+```css
+body {
+    background: white;
+}
+```
+
+You'll need to clear the Magento cache to enable your module, and make sure this layout XML update is properly loaded.
+
+Your new theme should now be active at `https://yourdomain.test`. Since this is a new theme, it should appear the same as the parent theme defined in your theme.xml file, which is usually Blank.
+
+#### Set up Grunt
+
+Run `bin/setup-grunt`. This will set up the Grunt configuration files for your new theme. It's important to run this step after setting up your new theme, not before.
+
+#### Start the Grunt watcher
+
+Grunt can watch for filesystem changes by running `bin/grunt watch`. You can optionally pass in the `--verbose` or `-v` flag to toggle verbose mode on. This will let you know what's going on under the hood, so you can be sure it is compiling & watching the correct files, and updating them as changes are made.
+
+#### LiveReload Browser extension
+
+Running the `grunt watch` process also spawns the LiveReload server. Your browser needs to connect to this server, and this is done by installing the [LiveReload browser extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en).
+
+In your browser, be sure to also open the Google Chrome Dev Tools, go to the Network tab, and click "Disable cache". This will ensure the browser does not long-cache static file assets, such as JavaScript & CSS files, which is important during development.
+
+Ensure the LiveReload browser icon has been toggled on, and refresh the page. We can confirm the LiveReload script is loaded by going to the Network tab and ensuring the `livereload.js` file is loaded, and that it also spawns off a new websocket request to `/livereload`.
+
+#### Test LiveReload
+
+Since this is all set, let's update the CSS file to a different background color:
+
+```css
+body {
+    background: blue;
+}
+```
+
+Upon saving this file, we will see the Grunt watcher detect the changes, and your browser should automatically load the new style without you needing to refresh the page, and without a full browser refresh.
+
 ## Credits
 
 ### M.academy

+ 2 - 0
compose/bin/analyse

@@ -0,0 +1,2 @@
+#!/bin/bash
+bin/cli vendor/bin/phpstan analyse "$@"

+ 1 - 1
compose/bin/cli

@@ -1,3 +1,3 @@
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
-docker-compose exec phpfpm "$@"
+bin/docker-compose exec phpfpm "$@"

+ 1 - 1
compose/bin/clinotty

@@ -1,4 +1,4 @@
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
 # -T: Disable pseudo-tty allocation
-docker-compose exec -T phpfpm "$@"
+bin/docker-compose exec -T phpfpm "$@"

+ 3 - 3
compose/bin/copyfromcontainer

@@ -3,13 +3,13 @@
 
 REAL_SRC=$(cd -P "src" && pwd)
 if [ "$1" == "--all" ]; then
-  docker cp "$(docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/./ "$REAL_SRC/"
+  docker cp "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/./ "$REAL_SRC/"
   echo "Completed copying all files from container to host"
 else
   if [ -f "$1" ] ; then
-    docker cp "$(docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$1" "$REAL_SRC/$1"
+    docker cp "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$1" "$REAL_SRC/$1"
   else
-    docker cp "$(docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$1" "$REAL_SRC/$(dirname "$1")"
+    docker cp "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$1" "$REAL_SRC/$(dirname "$1")"
   fi
   echo "Completed copying $1 from container to host"
 fi

+ 3 - 3
compose/bin/copytocontainer

@@ -3,15 +3,15 @@
 
 REAL_SRC=$(cd -P "src" && pwd)
 if [ "$1" == "--all" ]; then
-  docker cp "$REAL_SRC/./" "$(docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/
+  docker cp "$REAL_SRC/./" "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/
   echo "Completed copying all files from host to container"
   bin/fixowns
   bin/fixperms
 else
   if [ -f "$REAL_SRC/$1" ]; then
-    docker cp "$REAL_SRC/${1}" "$(docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$1"
+    docker cp "$REAL_SRC/${1}" "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$1"
   else
-    docker cp "$REAL_SRC/${1}" "$(docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$(dirname "$1")"
+    docker cp "$REAL_SRC/${1}" "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/"$(dirname "$1")"
   fi
   echo "Completed copying $1 from host to container"
   bin/fixowns "$1"

+ 1 - 1
compose/bin/cron

@@ -1,5 +1,5 @@
 #!/bin/bash
-[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
+[ -z "$1" ] && echo "Please specify a service operation (start|stop|status|restart|reload|force-reload)" && exit
 bin/root service cron "$@"
 bin/root touch /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status
 bin/root chown app:app /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status

+ 13 - 0
compose/bin/docker-compose

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if docker compose version > /dev/null 2>&1; then
+  DOCKER_COMPOSE="docker compose"
+else
+  DOCKER_COMPOSE="docker-compose"
+fi
+
+if [ "$1" == "--no-dev" ]; then
+  ${DOCKER_COMPOSE} -f compose.yaml -f compose.healthcheck.yaml "${@:2}"
+else
+  ${DOCKER_COMPOSE} -f compose.yaml -f compose.healthcheck.yaml -f compose.dev.yaml "$@"
+fi

+ 22 - 3
compose/bin/download

@@ -1,12 +1,31 @@
 #!/bin/bash
 
-VERSION=${1:-2.4.3-p1}
+VERSION=${1:-2.4.5-p1}
 EDITION=${2:-community}
 
 bin/stop
-docker-compose -f docker-compose.yml up -d
+
+# Translate version to root in integer format. Ex. 2.4.3-p1 -> 243
+VERSION_ROOT=$(echo "$VERSION" | cut -b 1-5 | sed -e 's/\.//g')
+
+if (( $(echo "$VERSION_ROOT < 244" | bc -l) )); then
+  sed -i -e 's/8.1\-fpm\-1/7.4\-fpm\-15/g' compose.yaml
+else
+  sed -i -e 's/7.4\-fpm\-15/8.1\-fpm\-1/g' compose.yaml
+fi
+
+bin/start --no-dev
 [ $? != 0 ] && echo "Failed to start Docker services" && exit
 
 bin/setup-composer-auth
 
-bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .
+bin/fixowns
+
+if [ "$EDITION" == "mageos" ]; then
+  bin/clinotty composer create-project --stability alpha --repository-url=https://upstream-nightly.mage-os.org magento/project-community-edition .
+else
+  bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .
+fi
+
+bin/clinotty [ ! -f "./var/composer_home/auth.json" ] && bin/clinotty mkdir -p ./var/composer_home && bin/clinotty cp /var/www/.composer/auth.json ./var/composer_home/auth.json
+

+ 1 - 1
compose/bin/grunt

@@ -1,2 +1,2 @@
 #!/bin/bash
-bin/cli grunt "$@"
+bin/cli npx grunt "$@"

+ 10 - 0
compose/bin/install-php-extensions

@@ -0,0 +1,10 @@
+#!/bin/bash
+if ! bin/cliq ls /usr/local/bin/install-php-extensions; then
+  echo "Downloading install-php-extensions, just a moment..."
+  bin/rootnotty curl -sSLf \
+    -o /usr/local/bin/install-php-extensions \
+    https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions
+  bin/rootnotty chmod +x /usr/local/bin/install-php-extensions
+fi
+
+bin/root install-php-extensions "$@"

+ 2 - 0
compose/bin/phpcbf

@@ -0,0 +1,2 @@
+#!/bin/bash
+bin/clinotty vendor/bin/phpcbf --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations "$@"

+ 2 - 0
compose/bin/phpcs

@@ -0,0 +1,2 @@
+#!/bin/bash
+bin/clinotty vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations "$@"

+ 2 - 0
compose/bin/phpcs-json-report

@@ -0,0 +1,2 @@
+#!/bin/bash
+bin/clinotty vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations --report=json "$@" > report.json

+ 1 - 1
compose/bin/redis

@@ -1,2 +1,2 @@
 #!/bin/bash
-docker-compose exec redis "$@"
+bin/docker-compose exec redis "$@"

+ 1 - 1
compose/bin/remove

@@ -1,2 +1,2 @@
 #!/bin/bash
-docker-compose -f docker-compose.yml -f docker-compose.dev.yml rm
+bin/docker-compose rm

+ 1 - 1
compose/bin/root

@@ -1,3 +1,3 @@
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
-docker-compose exec -u root phpfpm "$@"
+bin/docker-compose exec -u root phpfpm "$@"

+ 1 - 1
compose/bin/rootnotty

@@ -1,3 +1,3 @@
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
-docker-compose exec -u root -T phpfpm "$@"
+bin/docker-compose exec -u root -T phpfpm "$@"

+ 11 - 19
compose/bin/setup

@@ -3,7 +3,7 @@ set -o errexit
 
 MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)
 # Docker reports RAM 0.2 less than what it is actually set to
-(( $(echo "$MEM < 5.8" | bc -l) )) && echo "There must be at least 6GB of RAM allocated to Docker to continue." && exit
+(( $(echo "$MEM < 5.7" | bc -l) )) && echo "There must be at least 6GB of RAM allocated to Docker to continue." && exit
 
 # shellcheck source=../env/db.env
 source env/db.env
@@ -18,28 +18,16 @@ DOMAIN=${1:-magento.test}
 
 bin/stop
 
-docker-compose -f docker-compose.yml up -d
+bin/start --no-dev
 [ $? != 0 ] && echo "Failed to start Docker services" && exit
 
 bin/clinotty chmod u+x bin/magento
 rm -rf src && mkdir src
 
-echo "Waiting for connection to Elasticsearch..."
-bin/clinotty timeout $ES_HEALTHCHECK_TIMEOUT bash -c "
-    until curl --silent --output /dev/null http://$ES_HOST:$ES_PORT/_cat/health?h=st; do
-        printf '.'
-        sleep 2
-    done"
-[ $? != 0 ] && echo "Failed to connect to Elasticsearch" && exit
-
-echo ""
-echo "Waiting for connection to RabbitMQ..."
-bin/clinotty timeout $RABBITMQ_HEALTHCHECK_TIMEOUT bash -c "
-    until curl --silent --output /dev/null http://$RABBITMQ_DEFAULT_USER:$RABBITMQ_DEFAULT_PASS@$RABBITMQ_HOST:$RABBITMQ_MANAGEMENT_PORT/api/aliveness-test/%2F; do
-        printf '.'
-        sleep 2
-    done"
-[ $? != 0 ] && echo "Failed to connect to RabbitMQ" && exit
+echo "Adding Magento modules to Composer allow-plugins directive..."
+bin/clinotty composer config --no-plugins allow-plugins.magento/magento-composer-installer true
+bin/clinotty composer config --no-plugins allow-plugins.magento/inventory-composer-installer true
+bin/clinotty composer config --no-plugins allow-plugins.laminas/laminas-dependency-plugin true
 
 bin/clinotty bin/magento setup:install \
   --db-host="$MYSQL_HOST" \
@@ -90,6 +78,10 @@ bin/clinotty bin/magento indexer:reindex
 echo "Setting basic URL and generating SSL certificate..."
 bin/setup-domain "${DOMAIN}"
 
+echo "Fixing owner and permissions..."
+bin/fixowns
+bin/fixperms
+
 echo "Clearing the cache to apply updates..."
 bin/clinotty bin/magento cache:flush
 
@@ -99,7 +91,7 @@ bin/clinotty bin/magento cron:install
 echo "Turning on developer mode..."
 bin/clinotty bin/magento deploy:mode:set developer
 
-mv .vscode src/
+cp -r .vscode src/
 
 echo "Docker development environment setup complete."
 echo "You may now access your Magento instance at https://${DOMAIN}/"

+ 4 - 2
compose/bin/setup-domain

@@ -5,8 +5,10 @@ set -o errexit
 
 DOMAIN=$1
 
-echo "Your system password has been requested to add an entry to /etc/hosts..."
-echo "127.0.0.1 ::1 $DOMAIN" | sudo tee -a /etc/hosts
+if ! grep -q "$DOMAIN" /etc/hosts; then
+    echo "Your system password is needed to add an entry to /etc/hosts..."
+    echo "127.0.0.1 ::1 $DOMAIN" | sudo tee -a /etc/hosts
+fi
 
 echo "Set https://${DOMAIN}/ to web/secure/base_url and web/secure/base_url"
 bin/clinotty bin/magento config:set web/secure/base_url https://"$DOMAIN"/

+ 23 - 3
compose/bin/setup-grunt

@@ -1,4 +1,7 @@
 #!/bin/bash
+echo "Confirming n98-magerun2 is installed..."
+bin/n98-magerun2 > /dev/null 2>&1
+
 DEFAULT_THEME_ID="select value from core_config_data where path = 'design/theme/theme_id'"
 THEME_PATH="select theme_path from theme where theme_id in ($DEFAULT_THEME_ID);"
 VENDOR_THEME=$(bin/n98-magerun2 db:query "$THEME_PATH" | sed -n 2p | cut -d$'\r' -f1)
@@ -33,9 +36,26 @@ else
     bin/node -e "$GEN_THEME_JS"
 fi
 
-bin/clinotty cp package.json.sample package.json
-bin/clinotty cp Gruntfile.js.sample Gruntfile.js
-bin/clinotty cp grunt-config.json.sample grunt-config.json
+# Create files from sample files if they do not yet exist
+test -f src/package.json || cp src/package.json.sample src/package.json
+test -f src/Gruntfile.js || cp src/Gruntfile.js.sample src/Gruntfile.js
+test -f src/grunt-config.json || cp src/grunt-config.json.sample src/grunt-config.json
+
+# Disable grunt-contrib-jasmine on ARM processors (incompatible)
+if [ "$(uname -m)" == "arm64" ]; then
+    sed -e 's/"grunt-contrib-jasmine": "[~.0-9]*",//' src/package.json > package.json \
+      && mv package.json src/package.json
+fi
+
+# Enable these custom files on compose.dev.yaml so custom updates are persisted
+sed -e 's/grunt-config.json.sample/grunt-config.json/' compose.dev.yaml > compose.dev.yaml.updated \
+ && mv compose.dev.yaml.updated compose.dev.yaml
+sed -e 's/Gruntfile.js.sample/Gruntfile.js/' compose.dev.yaml > compose.dev.yaml.updated \
+ && mv compose.dev.yaml.updated compose.dev.yaml
+sed -e 's/package.json.sample/package.json/' compose.dev.yaml > compose.dev.yaml.updated \
+ && mv compose.dev.yaml.updated compose.dev.yaml
+bin/restart app phpfpm
+
 bin/npm install ajv@^5.0.0 --save
 bin/npm install
 bin/magento cache:clean

+ 4 - 4
compose/bin/setup-ssl

@@ -2,15 +2,15 @@
 [ -z "$1" ] && echo "Please specify a domain (ex. mydomain.test)" && exit
 
 # Generate certificate authority if not already setup
-if ! docker-compose exec -T -u root app cat /root/.local/share/mkcert/rootCA.pem | grep -q 'BEGIN CERTIFICATE'; then
+if ! bin/docker-compose exec -T -u root app cat /root/.local/share/mkcert/rootCA.pem | grep -q 'BEGIN CERTIFICATE'; then
   bin/setup-ssl-ca
 fi
 
 # Generate the certificate for the specified domain
-docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$@"
+bin/docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$@"
 echo "Moving key and cert to /etc/nginx/certs/..."
-docker-compose exec -T -u root app chown app:app nginx.key nginx.crt
-docker-compose exec -T -u root app mv nginx.key nginx.crt /etc/nginx/certs/
+bin/docker-compose exec -T -u root app chown app:app nginx.key nginx.crt
+bin/docker-compose exec -T -u root app mv nginx.key nginx.crt /etc/nginx/certs/
 
 # Restart nginx to apply the updates
 echo "Restarting containers to apply updates..."

+ 2 - 2
compose/bin/setup-ssl-ca

@@ -1,9 +1,9 @@
 #!/bin/bash
 set -o errexit
 # Generate a new local CA "/root/.local/share/mkcert"
-docker-compose exec -T -u root app mkcert -install
+bin/docker-compose exec -T -u root app mkcert -install
 
-docker cp "$(docker-compose ps -q app|awk '{print $1}')":/root/.local/share/mkcert/rootCA.pem .
+docker cp "$(bin/docker-compose ps -q app|awk '{print $1}')":/root/.local/share/mkcert/rootCA.pem .
 echo "System password requested to install certificate authority on host..."
 
 if [ "$(uname)" == "Darwin" ]; then

+ 10 - 5
compose/bin/start

@@ -3,7 +3,12 @@ set -o errexit
 
 MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)
 # Docker reports RAM 0.2 less than what it is actually set to
-(( $(echo "$MEM < 5.8" | bc -l) )) && echo "There must be at least 6GB of RAM allocated to Docker to continue." && exit
+(( $(echo "$MEM < 5.7" | bc -l) )) && echo "There must be at least 6GB of RAM allocated to Docker to continue." && exit
+
+if [ "$1" == "--no-dev" ]; then
+  bin/docker-compose --no-dev up -d --remove-orphans "${@:2}"
+  exit $?
+fi
 
 # Ref: https://stackoverflow.com/a/51789677/9821321
 function parseYaml {
@@ -37,13 +42,13 @@ function parseYaml {
 }
 
 # Check if volume files exist to avoid creating an empty folder
-VOLUME_LIST=$(parseYaml docker-compose.dev.yml services_app_volumes)
+VOLUME_LIST=$(parseYaml compose.dev.yaml services_app_volumes)
 IGNORE_LIST="./src/app/code ./src/m2-hotfixes ./src/patches ./src/var/log ./src/var/report ./src"
 IS_VALID=true
 
-# Loop through all files missing from the docker-compose.dev.yml file
+# Loop through all files missing from the compose.dev.yaml file
 for file in $VOLUME_LIST; do
-  if [ ! -e "$file" ] && [[ ! " $IGNORE_LIST " =~ $file ]]; then
+  if [[ ! -e $file && " $IGNORE_LIST " != *" $file "* ]]; then
     echo "$file: No such file or directory"
     IS_VALID=false
   fi
@@ -52,7 +57,7 @@ done
 # Wait to exit until all missing files have been outputted to the user
 [ $IS_VALID = false ] && echo "Failed to start docker for missing volume files" && exit
 
-docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --remove-orphans "$@"
+bin/docker-compose up -d --remove-orphans "$@"
 
 ## Blackfire support
 ## ------------------

+ 1 - 1
compose/bin/status

@@ -1,2 +1,2 @@
 #!/bin/bash
-docker-compose -f docker-compose.yml -f docker-compose.dev.yml ps
+bin/docker-compose ps

+ 1 - 1
compose/bin/stop

@@ -1,2 +1,2 @@
 #!/bin/bash
-docker-compose -f docker-compose.yml -f docker-compose.dev.yml stop "$@"
+bin/docker-compose stop "$@"

+ 1 - 1
compose/bin/update

@@ -3,7 +3,7 @@ set -o errexit
 mkdir -p tmpupdate && cd "$_"
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
 rm -rf .git
-rsync -av ./ ../
+rsync -av --checksum ./ ../
 cd ..
 rm -rf tmpupdate
 echo "docker-magento has been updated, run bin/restart to apply the updates"

+ 0 - 0
compose/docker-compose.dev-linux.yml → compose/compose.dev-linux.yaml


+ 0 - 0
compose/docker-compose.dev-ssh.yml → compose/compose.dev-ssh.yaml


+ 12 - 0
compose/docker-compose.dev.yml → compose/compose.dev.yaml

@@ -9,7 +9,11 @@ services:
       - ./src/app/etc:/var/www/html/app/etc:cached
       - ./src/composer.json:/var/www/html/composer.json:cached
       - ./src/composer.lock:/var/www/html/composer.lock:cached
+      - ./src/grunt-config.json.sample:/var/www/html/grunt-config.json:cached
+      - ./src/Gruntfile.js.sample:/var/www/html/Gruntfile.js:cached
+      - ./src/dev/tools/grunt/configs:/var/www/html/dev/tools/grunt/configs:cached
       - ./src/nginx.conf.sample:/var/www/html/nginx.conf:cached
+      - ./src/package.json.sample:/var/www/html/package.json:cached
       #- ./src/auth.json:/var/www/html/auth.json:cached
       #- ./src/m2-hotfixes:/var/www/html/m2-hotfixes:cached
       #- ./src/patches:/var/www/html/patches:cached
@@ -18,3 +22,11 @@ services:
 
   phpfpm:
     volumes: *appvolumes
+
+  phpmyadmin:
+    image: phpmyadmin/phpmyadmin
+    env_file: env/db.env
+    ports:
+      - "8080:80"
+    depends_on:
+      - db

+ 52 - 0
compose/compose.healthcheck.yaml

@@ -0,0 +1,52 @@
+version: "3"
+
+services:
+  app:
+    healthcheck:
+      test: 'curl --fail 127.0.0.1:8000'
+    depends_on:
+      phpfpm:
+        condition: service_started
+
+  phpfpm:
+    depends_on:
+      db:
+        condition: service_healthy
+      redis:
+        condition: service_healthy
+      elasticsearch:
+        condition: service_healthy
+      rabbitmq:
+        condition: service_healthy
+
+  db:
+    healthcheck:
+      test: 'mysqladmin ping -h localhost -u root -pmagento'
+      interval: 5s
+      timeout: 5s
+      retries: 30
+
+  redis:
+    healthcheck:
+      test: 'redis-cli ping || exit 1'
+      interval: 5s
+      timeout: 5s
+      retries: 30
+
+  elasticsearch:
+    healthcheck:
+      test: 'curl --fail elasticsearch:9200/_cat/health >/dev/null || exit 1'
+      interval: 5s
+      timeout: 5s
+      retries: 30
+
+  rabbitmq:
+    healthcheck:
+      test: 'rabbitmq-diagnostics -q ping'
+      interval: 5s
+      timeout: 5s
+      retries: 30
+
+  mailcatcher:
+    healthcheck:
+      test: 'wget --no-verbose --tries=1 --spider 127.0.0.1:1080 || exit 1'

+ 18 - 28
compose/docker-compose.yml → compose/compose.yaml

@@ -1,7 +1,7 @@
 ## Mark Shust's Docker Configuration for Magento
 ## (https://github.com/markshust/docker-magento)
 ##
-## Version 41.1.0
+## Version 43.2.0
 
 ## To use SSH, see https://github.com/markshust/docker-magento#ssh
 ## Linux users, see https://github.com/markshust/docker-magento#linux
@@ -14,7 +14,7 @@ version: "3"
 
 services:
   app:
-    image: markoshust/magento-nginx:1.18-7
+    image: markoshust/magento-nginx:1.18-8
     ports:
       - "80:8000"
       - "443:8443"
@@ -25,38 +25,32 @@ services:
       - appdata:/var/www/html
       - sockdata:/sock
       - ssldata:/etc/nginx/certs
-    extra_hosts: &appextrahosts
-      ## M1 Mac support to fix Docker delay, see #566
-      - "app:172.17.0.1"
-      - "phpfpm:172.17.0.1"
-      - "db:172.17.0.1"
-      - "redis:172.17.0.1"
-      - "opensearch:172.17.0.1"
-      - "rabbitmq:172.17.0.1"
+    #extra_hosts: &appextrahosts
       ## Selenium support, replace "magento.test" with URL of your site
-      - "magento.test:172.17.0.1"
+      #- "magento.test:172.17.0.1"
 
   phpfpm:
-    image: markoshust/magento-php:7.4-fpm-13
+    image: markoshust/magento-php:8.1-fpm-1
     volumes: *appvolumes
-    extra_hosts: *appextrahosts
     env_file: env/phpfpm.env
+    #extra_hosts: *appextrahosts
 
   db:
     image: mariadb:10.4
-    command: --max_allowed_packet=64M
+    command:
+      --max_allowed_packet=64M
+      --optimizer_use_condition_selectivity=1
+      --optimizer_switch="rowid_filter=off"
     ports:
       - "3306:3306"
     env_file: env/db.env
     volumes:
       - dbdata:/var/lib/mysql
-    extra_hosts: *appextrahosts
 
   redis:
-    image: redis:6.0-alpine
+    image: redis:6.2-alpine
     ports:
       - "6379:6379"
-    extra_hosts: *appextrahosts
 
   opensearch:
     image: markoshust/magento-opensearch:1.2.4-0
@@ -65,35 +59,31 @@ services:
       - "9300:9300"
     environment:
       - "discovery.type=single-node"
-      ## Set custom heap size to avoid memory errors
-      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
       ## Avoid test failures due to small disks
       ## More info at https://github.com/markshust/docker-magento/issues/488
       - "cluster.routing.allocation.disk.threshold_enabled=false"
       - "index.blocks.read_only_allow_delete"
-    extra_hosts: *appextrahosts
 
   rabbitmq:
-    image: rabbitmq:3.8.22-management-alpine
+    image: markoshust/magento-rabbitmq:3.9-0
     ports:
       - "15672:15672"
       - "5672:5672"
     volumes:
       - rabbitmqdata:/var/lib/rabbitmq
     env_file: env/rabbitmq.env
-    extra_hosts: *appextrahosts
 
   mailcatcher:
     image: sj26/mailcatcher
     ports:
       - "1080:1080"
-    extra_hosts: *appextrahosts
 
-  blackfire:
-    image: blackfire/blackfire:2
-    ports:
-      - "8307"
-    env_file: env/blackfire.env
+  ## Blackfire support, uncomment to enable
+  #blackfire:
+  #  image: blackfire/blackfire:2
+  #  ports:
+  #    - "8307"
+  #  env_file: env/blackfire.env
 
   ## Selenium support, uncomment to enable
   #selenium:

+ 0 - 1
compose/env/elasticsearch.env

@@ -1,3 +1,2 @@
 ES_HOST=elasticsearch
 ES_PORT=9200
-ES_HEALTHCHECK_TIMEOUT=100

+ 1 - 0
compose/env/phpfpm.env

@@ -1,3 +1,4 @@
 BLACKFIRE_CLIENT_ID=
 BLACKFIRE_CLIENT_TOKEN=
 COMPOSER_DISABLE_XDEBUG_WARN=1
+PHP_CS_FIXER_IGNORE_ENV=1

+ 0 - 2
compose/env/rabbitmq.env

@@ -4,5 +4,3 @@ RABBITMQ_MANAGEMENT_PORT=15672
 RABBITMQ_DEFAULT_USER=magento
 RABBITMQ_DEFAULT_PASS=magento
 RABBITMQ_DEFAULT_VHOST=/
-RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1GB
-RABBITMQ_HEALTHCHECK_TIMEOUT=10

+ 0 - 4
images/elasticsearch/6.8/Dockerfile

@@ -1,4 +0,0 @@
-FROM elasticsearch:6.8.8
-
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic

+ 5 - 0
images/elasticsearch/7.16/Dockerfile

@@ -0,0 +1,5 @@
+FROM elasticsearch:7.16.3
+
+RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \
+  analysis-icu \
+  analysis-phonetic

+ 0 - 4
images/elasticsearch/7.6/Dockerfile

@@ -1,4 +0,0 @@
-FROM elasticsearch:7.6.2
-
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic

+ 0 - 4
images/elasticsearch/7.7/Dockerfile

@@ -1,4 +0,0 @@
-FROM elasticsearch:7.7.1
-
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic

+ 0 - 4
images/elasticsearch/7.9/Dockerfile

@@ -1,4 +0,0 @@
-FROM elasticsearch:7.9.3
-
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
-RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic

+ 12 - 0
images/nginx/1.18/conf/default.conf

@@ -19,5 +19,17 @@ server {
   fastcgi_buffer_size 64k;
   fastcgi_buffers 8 128k;
 
+  location /livereload.js {
+    proxy_set_header Host $host;
+    proxy_pass http://phpfpm:35729/livereload.js;
+  }
+
+  location /livereload {
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "Upgrade";
+    proxy_pass http://phpfpm:35729/livereload;
+  }
+
   include /var/www/html/nginx[.]conf;
 }

+ 81 - 95
images/php/7.4/Dockerfile

@@ -1,111 +1,97 @@
-FROM php:7.4-fpm-buster
+FROM php:7.4-fpm-bullseye
 MAINTAINER Mark Shust <mark@shust.com>
 
 ARG APP_ID=1000
-
-RUN apt-get update && apt-get install -y \
-  cron \
-  git \
-  gzip \
-  libbz2-dev \
-  libfreetype6-dev \
-  libicu-dev \
-  libjpeg62-turbo-dev \
-  libwebp-dev \
-  libmcrypt-dev \
-  libonig-dev \
-  libpng-dev \
-  libsodium-dev \
-  libssh2-1-dev \
-  libxslt1-dev \
-  libzip-dev \
-  lsof \
-  default-mysql-client \
-  vim \
-  zip \
-  procps
-
-RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp
-
-RUN docker-php-ext-install \
-  bcmath \
-  bz2 \
-  calendar \
-  exif \
-  gd \
-  gettext \
-  intl \
-  mbstring \
-  mysqli \
-  opcache \
-  pcntl \
-  pdo_mysql \
-  soap \
-  sockets \
-  sodium \
-  sysvmsg \
-  sysvsem \
-  sysvshm \
-  xsl \
-  zip
-
-ARG TARGETARCH
-
-RUN cd /tmp \
-  && ARCH=$(if [ "$TARGETARCH" = "arm64" ]; then echo aarch64; else echo x86-64; fi;) \
-  && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$ARCH.tar.gz \
-  && tar zxvf ioncube_loaders_lin_$ARCH.tar.gz \
-  && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \
-  && export PHP_EXT_DIR=$(php-config --extension-dir) \
-  && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \
-  && rm -rf ./ioncube \
-  && rm ioncube_loaders_lin_$ARCH.tar.gz \
-  && docker-php-ext-enable ioncube
-
-RUN pecl channel-update pecl.php.net \
-  && pecl install xdebug \
-  && docker-php-ext-enable xdebug
-
-RUN pecl install ssh2-1.2 \
-  && docker-php-ext-enable ssh2
-
-RUN pecl install redis \
-  && docker-php-ext-enable redis
-
-RUN apt-get install -y libmagickwand-dev \
-  && pecl install imagick  \
-  && docker-php-ext-enable imagick
-
 RUN groupadd -g "$APP_ID" app \
   && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
 
-RUN apt-get install -y gnupg \
-  && curl -sL https://deb.nodesource.com/setup_14.x | bash - \
-  && apt-get install -y nodejs \
-  && mkdir /var/www/.config /var/www/.npm \
-  && chown app:app /var/www/.config /var/www/.npm \
-  && npm install -g grunt-cli
+RUN mkdir -p /etc/nginx/html /var/www/html /sock \
+  && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
 
-RUN apt-get install -y msmtp mailutils
-COPY conf/msmtprc /etc/msmtprc
+RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
+
+RUN apt-get update && apt-get install -y \
+    cron \
+    default-mysql-client \
+    git \
+    gnupg \
+    gzip \
+    libbz2-dev \
+    libfreetype6-dev \
+    libicu-dev \
+    libjpeg62-turbo-dev \
+    libmagickwand-dev \
+    libmcrypt-dev \
+    libonig-dev \
+    libpng-dev \
+    libsodium-dev \
+    libssh2-1-dev \
+    libwebp-dev \
+    libxslt1-dev \
+    libzip-dev \
+    lsof \
+    mailutils \
+    msmtp \
+    nodejs \
+    procps \
+    vim \
+    zip \
+  && rm -rf /var/lib/apt/lists/*
+
+RUN pecl channel-update pecl.php.net && pecl install \
+    imagick \
+    redis \
+    ssh2-1.2 \
+    xdebug \
+  && pecl clear-cache \
+  && rm -rf /tmp/pear
+
+RUN docker-php-ext-configure \
+    gd --with-freetype --with-jpeg --with-webp \
+  && docker-php-ext-install \
+    bcmath \
+    bz2 \
+    calendar \
+    exif \
+    gd \
+    gettext \
+    intl \
+    mbstring \
+    mysqli \
+    opcache \
+    pcntl \
+    pdo_mysql \
+    soap \
+    sockets \
+    sodium \
+    sysvmsg \
+    sysvsem \
+    sysvshm \
+    xsl \
+    zip \
+  && docker-php-ext-enable \
+    imagick \
+    redis \
+    ssh2 \
+    xdebug
+
+RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
+    && architecture=$(uname -m) \
+    && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
+    && mkdir -p /tmp/blackfire \
+    && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
+    && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
+    && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
 
 RUN curl -sS https://getcomposer.org/installer | \
   php -- --install-dir=/usr/local/bin --filename=composer
 
-RUN curl -s https://packages.blackfire.io/gpg.key | apt-key add - \
-  && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \
-  && apt-get update \
-  && apt-get install blackfire-agent blackfire-php
-
-COPY conf/www.conf /usr/local/etc/php-fpm.d/
-COPY conf/php.ini /usr/local/etc/php/
+COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini
+COPY conf/msmtprc /etc/msmtprc
+COPY conf/php.ini $PHP_INI_DIR
 COPY conf/php-fpm.conf /usr/local/etc/
-
-RUN mkdir -p /etc/nginx/html /var/www/html /sock \
-  && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
+COPY conf/www.conf /usr/local/etc/php-fpm.d/
 
 USER app:app
-
 VOLUME /var/www
-
 WORKDIR /var/www/html

+ 2 - 0
images/php/7.4/conf/blackfire.ini

@@ -0,0 +1,2 @@
+extension=blackfire.so
+blackfire.agent_socket=tcp://blackfire:8307

+ 5 - 2
images/php/8.1/Dockerfile

@@ -1,4 +1,4 @@
-FROM php:8.1.4-fpm-buster
+FROM php:8.1-fpm-bullseye
 MAINTAINER Mark Shust <mark@shust.com>
 
 ARG APP_ID=1000
@@ -8,6 +8,8 @@ RUN groupadd -g "$APP_ID" app \
 RUN mkdir -p /etc/nginx/html /var/www/html /sock \
   && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
 
+RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
+
 RUN apt-get update && apt-get install -y \
     cron \
     default-mysql-client \
@@ -17,7 +19,6 @@ RUN apt-get update && apt-get install -y \
     libbz2-dev \
     libfreetype6-dev \
     libicu-dev \
-    libwebp-dev \
     libjpeg62-turbo-dev \
     libmagickwand-dev \
     libmcrypt-dev \
@@ -25,11 +26,13 @@ RUN apt-get update && apt-get install -y \
     libpng-dev \
     libsodium-dev \
     libssh2-1-dev \
+    libwebp-dev \
     libxslt1-dev \
     libzip-dev \
     lsof \
     mailutils \
     msmtp \
+    nodejs \
     procps \
     vim \
     zip \

+ 3 - 0
images/rabbitmq/3.9/Dockerfile

@@ -0,0 +1,3 @@
+FROM rabbitmq:3.9-management-alpine
+
+COPY conf/rabbitmq.conf /etc/rabbitmq/rabbitmq.conf

+ 1 - 0
images/rabbitmq/3.9/conf/rabbitmq.conf

@@ -0,0 +1 @@
+vm_memory_high_watermark.absolute = 1GB

+ 1 - 1
lib/onelinesetup

@@ -2,7 +2,7 @@
 set -o errexit
 
 DOMAIN=${1:-magento.test}
-VERSION=${2:-2.4.3-p1}
+VERSION=${2:-2.4.5-p1}
 EDITION=${3:-community}
 
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash