CLI containers
The following CLI containers, most of which are based on a PHP-CLI version 7 image, provide magento-cloud and ece-tools commands to perform file system operations and interact with the application.
Operations include:
build—extends the CLI container to perform operations with writable filesystem, similar to the build phasedeploy—extends the CLI container to use read-only file system, similar to the deploy phasecron—extends the CLI container to run cronnode—based on node image, used for NPM activities
For example, you can check the state of your project using the ideal-state wizard:
docker compose run --rm deploy ece-command wizard:ideal-state
Sample response:
- Your application does not have the "post_deploy" hook enabled.
The configured state is not ideal
All build and deploy processes are defined and configured using ece-tools and the Cloud template.
CLI container commands
These commands are available in the Cloud Docker for Commerce environment:
cloud-build.magento.app.yml filecloud-deploy.magento.app.yml filecloud-post-deploy.magento.app.yml filemagento-commandmftf-commandrun-cronSee the scripts in the Cloud Docker for Commerce GitHub repository to understand the processing for each command.
Build container
- Container name: build
- Docker base image: magento/magento-cloud-docker-php, which is based on the Docker php image
The Build container mimics the behavior of the Adobe Commerce on cloud infrastructure build process so that testing the build and deploy process is as close to testing in production as possible.
You can run build commands manually from the build container to perform individual steps from the build process. For example, you can run the following command to deploy static content:
docker compose run --rm build magento-command setup:static-content:deploy
Cron container
- Container name: cron
- Docker base image: magento/magento-cloud-docker-php, which is based on the Docker php image
The Cron container runs operations in the background immediately after the Docker environment starts. This container uses the cron configuration defined in the crons property of the .magento.app.yaml file. This container has no custom configuration.
data-variant=info
data-slots=text
./vendor/bin/ece-docker build:compose --mode="developer" --with-cronFor details on managing cron jobs in the Cloud Docker environment, see Manage cron jobs.
Deploy container
- Container name: deploy
- Docker base image: magento/magento-cloud-docker-php, which is based on the php Docker image
The Deploy container mimics the Adobe Commerce on cloud infrastructure deploy process so that testing the build and deploy process is as close to testing in production as possible.
You can run build and deploy commands manually from the deploy container. The following example reindexes the Adobe Commerce store:
docker compose run --rm deploy magento-command index:reindex
Node container
- Container name: node
- Docker base image: node
The Node container is based on the official Node Docker image. You can use the container to install NPM dependencies, such as Gulp, or run any Node-based command-line tools.
To add the Node container to the Docker environment, you must specify the Node version to install:
./vendor/bin/ece-docker build:compose --node <version>