Edit in GitHubLog an issue

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 phase
  • deploy—extends the CLI container to use read-only file system, similar to the deploy phase
  • cron—extends the CLI container to run cron
  • node—based on node image, used for NPM activities

For example, you can check the state of your project using the ideal-state wizard:

Copied to your clipboard
docker compose run --rm deploy ece-command wizard:ideal-state

Sample response:

Copied to your clipboard
- 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:

CommandTarget ContainersNotes
cloud-build
build
Build the application in production mode, configured by the build hook in the .magento.app.yml file
cloud-deploy
deploy
Deploy the application, configured by the deploy hook in the .magento.app.yml file
cloud-post-deploy
deploy
Run post deploy hooks, configured by the post deploy hook in the .magento.app.yml file
ece-command
deploy
magento-command
deploy
Run bin/magento commands
mftf-command
deploy
Run MFTF command for testing
run-cron
cron
Run cron jobs

See the scripts in the Cloud Docker for Commerce GitHub repository to understand the processing for each command.

Build container

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:

Copied to your clipboard
docker compose run --rm build magento-command setup:static-content:deploy

Cron container

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.

For details on managing cron jobs in the Cloud Docker environment, see Manage cron jobs.

Deploy container

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:

Copied to your clipboard
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:

Copied to your clipboard
./vendor/bin/ece-docker build:compose --node <version>
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.