Created
July 23, 2014 05:47
-
-
Save virtuald/978e18936e8603a2862f to your computer and use it in GitHub Desktop.
Docker bug with ENTRYPOINT and CMD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM dockerfile/python | |
ADD / /build | |
ENTRYPOINT ["/build/foo.py"] | |
# output: args ['/build/foo.py', 'bash'] | |
# None of these work as expected either | |
#CMD ['arg1'] | |
# output: args ['/build/foo.py', '/bin/sh', '-c', "['arg1']"] | |
#CMD ['arg1', 'arg2'] | |
# output: args ['/build/foo.py', '/bin/sh', '-c', "['arg1', 'arg2']"] | |
#CMD 'arg1 arg2' | |
# output: args ['/build/foo.py', '/bin/sh', '-c', "'arg1 arg2'"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
print 'args', sys.argv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment