Category : stdout

Consider this issue.py file: import subprocess print(‘Calling subprocess…’) subprocess.run([‘python’, ‘–version’]) print(‘Subprocess is done!’) Executing python issue.py manually yields what I expect: Calling subprocess… Python 3.9.0 Subprocess is done! However, if I execute this inside a Docker container, something weird happens: $ docker run –rm -v $(pwd):/issue python:3.9.0 python /issue/issue.py Python 3.9.0 Calling subprocess… Subprocess is ..

Read more

I am trying to configure my php errors to output to docker logs. All documentation I have read indicates that docker logs are tied to the containers stdout and stderr which come from /proc/self/fd/1 and /proc/self/fd/2. I created a symlink from my php error log file /var/log/php_errors.log to /proc/self/fd/1 with command: ln -sf /proc/self/fd/1 /var/log/php_errors.log ..

Read more

In python with docker-py, I am running two docker containers: eclipse-mosquitto an ubuntu:bionic based image where my C++ App is launched with ENTRYPOINT ["/directory/myApp"] I use the following docker-py API: container = client.containers.run(imageName, detach=True, name=containerName, ports = ports, volumes = volumes) When it is the eclipse-mosquitto container, if I call container.logs() I got the following ..

Read more