Created
January 31, 2019 04:09
-
-
Save ezirmusitua/2deee11bec742718073869cc39701ff4 to your computer and use it in GitHub Desktop.
[Run command in running container] run command in running container #docker #shell
This file contains hidden or 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
# container must run bash at first | |
docker run -it -d shykes/pybuilder /bin/bash | |
# use exec to run command | |
docker exec -it <container_id_or_name> echo "Hello from container!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment