Start, stop, restart and check container status
Lesson Summary
The most basic helper scripts in docker-magento are:
bin/start
bin/stop
bin/restart
To start a project, run bin/start
, which is automatically done after setting up Magento. This command needs to be run every time you restart the host machine or the Docker daemon. It starts all services defined in the docker-magento YML files. The related command bin/stop
does the opposite, stopping all containers and services. This needs to be run when starting another docker-magento project.
There are a few commands available:
bin/restart
: Stops containers if they're not already stopped and then starts them back up.bin/status
: Provides the status of all services, indicating if they are running or stopped.
You can have multiple docker-magento projects installed on a single machine, but only one project can run at a time. bin/restart
is useful for making changes to ini or config files and needing to restart services for the changes to take effect.