I try to interface docker using python:
In a shell session I have run:
docker run --rm --net host busybox /bin/sh -c "ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p'"
And for a utility script that interfaced docker using python and docker-sdk I run the same command as well:
import docker
client = docker.from_env()
print(client.containers.run('busybox',["/bin/sh","-c","ip
…
But it seems that I fail to get same output from the one I cat from docker-cli. Can u help me?