-
-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Local Environment Basic Usage
Alexander Lukyanov edited this page Apr 29, 2022
·
5 revisions
- Install, run and verify that Docker Local Services working properly.
- Have at least one project: Docker Local Environment For A New Project
NOTE: The parameter -u www
may be skipped in the commands below where there is a file permission issue.
The following command installs Magento 2 cron to the PHP CLI container crontab:
docker-compose exec -u www cli bin/magento cron:install
When any new changes has been added to docker-compose.yml, .env or global.env file you will need to restart containers. You can run the following commands from the project directory:
docker-compose stop
docker-compose up -d
When you want to update container's images run the following commands from the project directory:
docker-compose stop
docker-compose pull
docker-compose up -d
docker-compose exec -u www {command} cli
Example:
docker-compose exec -u www cli bin/magento cron:install
The example for the php cli container:
docker-compose run -u www cli bash