Docker-py: How to write to container's stdin ?

Created on 19 Dec 2017  路  2Comments  路  Source: docker/docker-py

My container needs input to work and I am struggling with doing that via API but I am not able to do that.
I have tried many configurations for create and start functions, but it tells me that Socket is not writable. It's obvious that I am missing something.

It would be great if you could share a sample code of how we should do that ?

Thanks in advance.

kinquestion

All 2 comments

I've built a project mimicking the behavior of Docker CLI with docker-py, and you may check out how I handle these commands: qazbnm456/tsaotun#tsaotun/lib/Docker/Container.

I think you should focus on exec related commands which I also take advantage of d11wtq/dockerpty.

Was this page helpful?
0 / 5 - 0 ratings