I have a simple code for which I have created a docker container and the status shows it running fine. Inside the code I have used some print()
commands to print the data. I wanted to see that print command output.
For this I have seen docker logs . But it seems not to be working as it shows no logs. How to check logs.?
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a3b3fd261b94 myfirstdocker "python3 ./my_script…" 22 minutes ago Up 22 minutes elegant_darwin
$ sudo docker logs a3b3fd261b94
<shows nothing>
complete
:-). As it says in the relative section: " - Some people might be prepared to load the parts up, and actually try them to test the answer they're about to post. - The problem might not be in the part you suspect it is, but another part entirely."