Docker Community Forums

Share and learn in the Docker community.

Docker PHP stdout?

Hi,

I’m brand new to containers and Docker, although I’m proficient in client-server programming, PHP and other languages. I ran PHP script from a command line; the script is within a container somewhere in Docker, and I can’t see the output of a standard ‘echo’ debug command. My script looks something like this:

<?php echo "Hello world"'; // no closing tag for security purposes Why can I not see the output in cmd on Windows? TIA.

Depending on how you started your container, it might only be available (if you havent given it a terminal using -t flags) in the logs of the container. Yet it’s still available using docker logs <containerId>