Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python run docker interactively subprocess

from subprocess import Popen, PIPE

p = Popen("docker run -i -t --name="%s" dockerfile/python /bin/bash", stdin=PIPE)
p.communicate("timeout 0.5 python | head -n 500000 
" % run_this)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #run #docker #interactively #subprocess
ADD COMMENT
Topic
Name
6+4 =