Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/docker/configure/extend-docker-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ You can add PHP extensions to the PHP container by adding the extension configur
Use the following attributes to specify the PHP extension configuration in the `getConfig` method in the [ExtensionResolver.php][] file. The configuration you specify depends on method of installation: from the official Docker PHP images, from the PECL repository, or using an installation script.

| Configuration option | Description |
| -------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PHP version constraint | Specifies the extension versions to install. If different versions have different installation requirements, you must add the configuration for each version. |
| `EXTENSION_TYPE_CORE` | Extension that can be installed from a `docker-php-source` image. |
| `EXTENSION_TYPE_PECL` | Extensions that can be installed from the [PECL][] repository. |
Expand Down
61 changes: 30 additions & 31 deletions src/pages/docker/containers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ keywords:
- Tools
---

# Container Architecture
# Container architecture

The `magento-cloud-docker` package contains build information to create a Docker environment with the required specifications for Adobe Commerce.

The build configuration creates a Docker instance with CLI and service containers required to preview and test an Adobe Commerce project in a local Docker environment. Cloud Docker for Commerce generates the `docker-compose.yml` file to the required specifications. Then, use `docker compose` to create the container instances and build and deploy the Adobe Commerce site.

## CLI Containers
## CLI containers

The following CLI containers, most of which are based on a PHP-CLI version 7 Docker image, provide `magento-cloud` and `ece-tools` commands to perform file system operations and interact with the application:

| Name | Service | Key & options | Available Versions | Notes |
|----------------------|------------------|---------------|--------------------|------------------------------------------------------------------|
| [node](cli.md#node-container) | Node | `--node` | 6, 8, 10, 11 | Optional Node container used for gulp or other NPM-based commands |
| [cron](cli.md#cron-container) | Cron Jobs | `--with-cron` | none | Optional PHP Container runs cron tasks |
| [build](cli.md#build-container) | Build Container | none | none | PHP Container, runs build process |
| [deploy](cli.md#deploy-container) | Deploy Container | none | none | PHP Container, runs the deploy process |
| Name | Service | Key & options | Available Versions | Notes |
| --- | --- | --- | --- | --- |
| [node](cli.md#node-container) | Node | `--node` | 6, 8, 10, 11 | Optional Node container used for gulp or other NPM-based commands |
| [cron](cli.md#cron-container) | Cron Jobs | `--with-cron` | none | Optional PHP container runs cron tasks |
| [build](cli.md#build-container) | Build Container | none | none | PHP container, runs build process |
| [deploy](cli.md#deploy-container) | Deploy Container | none | none | PHP container, runs the deploy process |

See [CLI containers](cli.md).

Expand All @@ -42,31 +42,30 @@ See [Service containers](service.md).

The following table shows the options to customize service container configuration when you generate the Docker Compose configuration file.

| Name | Service | Key & options | Available Versions | Notes |
|-----------------------------------------------------|------------------|-------------------------|------------------------------------------------------|------------------------------|
| [db](service.md#database-container) | MariaDB or MySQL | `--db`, `--db-image` (MySQL)\<br/\>`--expose-db-port`\<br/\>`--db-increment`\<br/\>`--db-offset`\<br/\>`--with-entrypoint`\<br/\>`--with-mariadb-config` | 10.0, 10.1, 10.2, 10.3, 10.4, 10.6\<br/\>5.6, 5.7, 8.0 | Use the increment and offset options to customize the [auto-increment settings][Using AUTO_INCREMENT] for replication.\<br/\>\<br/\>Use the `--with-entrypoint` and `--with-mariadb-config` options to automatically configure database directories in the Docker environment\<br/\>\<br/\>**Example build commands**:\<br/\>`ece-docker build:compose --db <mariadb-version>`\<br/\>`ece-docker build:compose --db <mysql-version> --db-image` |
| [elasticsearch](service.md#elasticsearch-container) | Elasticsearch | `--es`\<br/\>`--es-env-var`\<br/\>`--no-es` | 5.2, 6.5, 6.8, 7.5, 7.6, 7.7, 7.9, 7.10, 7.11 | Use the options to specify the Elasticsearch version, customize Elasticsearch configuration options, or to build a Docker environment without Elasticsearch. |
| [opensearch](service.md#opensearch-container) | OpenSearch | `--os`\<br/\>`--os-env-var`\<br/\>`--no-os` | 1.1, 1.2, 1.3, 2.12, 2.3, 2.4, 2.5, 3.0 | Use the options to specify the OpenSearch version, customize OpenSearch configuration options, or to build a Docker environment without OpenSearch.|
| [fpm](service.md#fpm-container) | PHP FPM | `--php`\<br/\>`--with-xdebug` | 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 | Used for all incoming requests. Optionally, install a specific php version or add Xdebug to debug PHP code in the Docker environment. |
| [mailhog](service.md#mailhog-container) | MailHog | `--no-mailhog`\<br/\>`--mailhog-http-port`\<br/\>`--mailhog-smtp-port` | latest | Email service to replace Sendmail service, which can cause issues in Docker environment |
| [node](cli.md#node-container) | Node | `--node` | 6, 8, 10, 11 | Node container to run gulp or other NPM based commands in the Docker environment. Use the `--node` option to install a specific node version. |
| [activemq](service.md#activemq-container) | ActiveMQ Artemis | `--amq` | 2.4, 2.5, 2.6, 2.7, 2.8, 2.9 | Use the `--amq` option to install a specific ActiveMQ Artemis version. |
| [rabbitmq](service.md#rabbitmq-container) | RabbitMQ | `--rmq` | 3.5, 3.7, 3.8, 3.9 | Use the `--rmq` option to install a specific RabbitMQ version. |
| [redis](service.md#redis-container) | Redis | `--redis` | 3.2, 5.0, 6.0, 7.0 | Standard redis container |
| [valkey](service.md#valkey-container) | Valkey | `--valkey` | 8.0 | Standard valkey container |
| [selenium](service.md#selenium-container) | Selenium | `--with-selenium`\<br/\>`--selenium-version`\<br/\>`--selenium-image` | Any | Enables application testing using the Magento Functional Testing Framework (MFTF) |
| [test](service.md#test-container) | PHP CLI | `--with-test` | Any | Optional container with a writable file system for running tests |
| [tls](service.md#tls-container) | SSL Endpoint | `--tls-port`\<br/\>`--no-tls` | nginx 1.19 | Terminates SSL, can be configured to pass to varnish or nginx. Use the `--tls-port` option to change the default port (443).\<br/\>Use the `--no-tls` option to disable tls. |
| [varnish](service.md#varnish-container) | Varnish | `--no-varnish` | 4, 6.2, 6.6, 7.0, 7.1 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation. |
| [zookeeper](service.md#zookeeper-container) | Zookeeper | `--with-zookeeper`\<br/\>`--zookeeper-version`\<br/\>`--zookeeper-image` | latest (default)\<br/\>User-specified version | Optional container for Zookeeper lock provider for projects not hosted on Adobe Commerce on Cloud infrastructure.\<br/\>Use the `--zookeeper-version` option to install a specified version of Zookeeper from the Docker Hub or install a specified image by name with the `--zookeeper-image` option. |
| Name | Service | Key & options | Available Versions | Notes |
| --- | --- | --- | --- | --- |
| [db](service.md#database-container) | MariaDB or MySQL | `--db`, `--db-image` (MySQL), `--expose-db-port`, `--db-increment`, `--db-offset`, `--with-entrypoint`, `--with-mariadb-config` | 10.6, 10.11, 11.4, 8.0 | Use the increment and offset options to customize the [auto-increment settings][Using AUTO_INCREMENT] for replication. Use the `--with-entrypoint` and `--with-mariadb-config` options to automatically configure database directories in the Docker environment. **Example build commands**: `ece-docker build:compose --db <mariadb-version>`, `ece-docker build:compose --db <mysql-version> --db-image` |
| [opensearch](service.md#opensearch-container) | OpenSearch | `--os`, `--os-env-var`, `--no-os` | 2.3, 2.4, 2.5, 2.12, 3.0 | Use the options to specify the OpenSearch version, customize OpenSearch configuration options, or to build a Docker environment without OpenSearch. |
| [fpm](service.md#fpm-container) | PHP FPM | `--php`, `--with-xdebug` | 8.0, 8.1, 8.2, 8.3, 8.4 | Used for all incoming requests. Optionally, install a specific PHP version or add Xdebug to debug PHP code in the Docker environment. |
| [mailhog](service.md#mailhog-container) | MailHog | `--no-mailhog`, `--mailhog-http-port`, `--mailhog-smtp-port` | latest | Email service to replace Sendmail service, which can cause issues in Docker environment. |
| [node](cli.md#node-container) | Node | `--node` | 14, 16, 18 | Node container to run gulp or other NPM-based commands in the Docker environment. Use the `--node` option to install a specific node version. |
| [activemq](service.md#activemq-container) | ActiveMQ Artemis | `--amq` | 2.4, 2.5, 2.6, 2.7, 2.8, 2.9 | Use the `--amq` option to install a specific ActiveMQ Artemis version. |
| [rabbitmq](service.md#rabbitmq-container) | RabbitMQ | `--rmq` | 3.9, 3.11, 3.12, 3.13, 4.1 | Use the `--rmq` option to install a specific RabbitMQ version. |
| [redis](service.md#redis-container) | Redis | `--redis` | 6.0, 7.0, 7.2 | Standard Redis container. |
| [valkey](service.md#valkey-container) | Valkey | `--valkey` | 8.0 | Standard Valkey container. |
| [selenium](service.md#selenium-container) | Selenium | `--with-selenium`, `--selenium-version`, `--selenium-image` | Any | Enables application testing using the Magento Functional Testing Framework (MFTF). |
| [test](service.md#test-container) | PHP CLI | `--with-test` | Any | Optional container with a writable file system for running tests. |
| [tls](service.md#tls-container) | SSL Endpoint | `--tls-port`, `--no-tls` | nginx 1.19 | Terminates SSL, can be configured to pass to Varnish or nginx. Use the `--tls-port` option to change the default port (443). Use the `--no-tls` option to disable TLS. |
| [varnish](service.md#varnish-container) | Varnish | `--no-varnish` | 4, 6.2, 6.6, 7.0, 7.1 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation. |
| [zookeeper](service.md#zookeeper-container) | Zookeeper | `--with-zookeeper`, `--zookeeper-version`, `--zookeeper-image` | latest (default), user-specified version | Optional container for Zookeeper lock provider for projects not hosted on Adobe Commerce on Cloud infrastructure. Use the `--zookeeper-version` option to install a specified version of Zookeeper from the Docker Hub or install a specified image by name with the `--zookeeper-image` option. |

Use the following command to view all available options for the `ece-docker build:compose` command:

```bash
./vendor/bin/ece-docker build:compose --help
```

## Request Flow
## Request flow

Web requests to `https://magento2.docker/` are handled by the Docker containers using the following request flow:

Expand Down Expand Up @@ -111,15 +110,15 @@ You can customize this configuration by updating the [`mounts`][mount-configurat

Also, you can share data into the containers using file synchronization. See the [File synchronization](../setup/synchronize-data.md) and [Developer mode](../deploy/developer-mode.md) documentation.

## Container Volumes
## Container volumes

Cloud Docker for Commerce uses Docker volumes to maintain data throughout the lifecycle of the Docker containers. These volumes can be defined in several ways:

- Docker Compose files such as `docker-compose.yml`
- Dockerfile from the [magento-cloud-docker repository](https://github.com/magento/magento-cloud-docker)
- Upstream Docker image

You do not interact with most of these volumes, which are used by the Docker containers and follow the docker-compose lifecycle. The only exception to this is the `magento-sync` directory that is an external volume used by the Mutagen application to transport data into the containers from the host operating system.
You do not interact with most of these volumes, which are used by the Docker containers and follow the Docker Compose lifecycle. The only exception to this is the `magento-sync` directory that is an external volume used by the Mutagen application to transport data into the containers from the host operating system.

### Rebuild a clean environment

Expand All @@ -137,17 +136,17 @@ The `magento-sync` volume is an external volume that you must create or delete m
ERROR: Volume magento-sync declared as external, but could not be found. Please create the volume manually using `docker volume create --name=magento-sync` and try again.
```

## Container Logs
## Container logs

All containers use the Docker logging method. You can view the logs using the `docker-compose` command. The following example uses the `-f` option to _follow_ the log output of the TLS container:
All containers use the Docker logging method. You can view the logs using the `docker compose` command. The following example uses the `-f` option to _follow_ the log output of the TLS container:

```bash
docker compose logs -f tls
```

Now you can see all requests that are passing through the TLS container and check for errors.

\<!-- link definitions --\>
<!-- link definitions -->

[Using AUTO_INCREMENT]: https://dev.mysql.com/doc/refman/8.4/en/example-auto-increment.html
[mount-configuration]: https://experienceleague.adobe.com/en/docs/commerce-on-cloud/user-guide/configure/app/properties/properties
Loading