Magento – Magento 2: Run commands in Docker

clidockermagento2

I am new to docker and devbox. I have setup DevBox Successfully and its working fine in a local system. I need information how to

  • run CLI ie. php bin/magento cache:flush
  • access phpmyadmin

My local setup details:

Please comment if more information required.

Update: Command "docker ps -a" displayed container then I executed the clean command but it's not working. Please suggest what path I am missing here:

enter image description here

Best Answer

The better way is to open your container, you can use the command:

docker exec -ti CONTAINER_NAME bash

so you will enter into docker container and use all commands that you want execute normally.

Remember to access the web container and not the db

To exit you can use the command exit.

Related Topic