title: How to run Symfony console command inside the docker container
body: <p>I am trying to run Symfony 3 console command inside of my docker container but not able to getting proper output.</p>
  
  <h3>docker-compose.yaml</h3>
  
  <pre><code>version: '3.4'
  
  services:
    app:
      build:
        context: .
        target: symfony_docker_php
        args:
          SYMFONY_VERSION: ${SYMFONY_VERSION:-}
          STABILITY: ${STABILITY:-stable}
      volumes:
        # Comment out the next line in production
        - ./:/srv/app:rw,cached
        # If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
        - /srv/app/var/
        - /srv/app/var/cache/
        - /srv/app/var/logs/
        - /srv/app/var/sessions/
      environment:
        - SYMFONY_VERSION
  
    nginx:
      build:
        context: .
        target: symfony_docker_nginx
      depends_on:
        - app
      volumes:
        # Comment out the next line in production
        - ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
        - ./public:/srv/app/public:ro
      ports:
        - '80:80'
  
  </code></pre>
  
  <p>My console command
  <code>docker-compose exec nginx php bin/console</code></p>
  
  <p>It returns the following response
  <code>the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'</code></p>