tulik / symfony-4-docker-env

Docker Environment for Symfony. PHP-FPM, NGINX SSL Proxy, MySQL, LEMP
MIT License
118 stars 60 forks source link

How to run symfony commands? #40

Closed maykino closed 5 years ago

maykino commented 6 years ago

What is the best practice for running symfony commands for this setup? Also, what is the best way to get shell of the web server container?

tulik commented 6 years ago
  1. Run command inside container with $ docker-compose exec [container-name] [cmd] Example $ docker-compose exec php bin/console d:d:c

  2. Get shell $ docker-compose exec php sh

  3. If you want to run the complex command you can use $ docker-compose exec [container] sh -c "awk ..."