Skip to content

Instantly share code, notes, and snippets.

@ezirmusitua
Created January 31, 2019 04:09
Show Gist options
  • Save ezirmusitua/2deee11bec742718073869cc39701ff4 to your computer and use it in GitHub Desktop.
Save ezirmusitua/2deee11bec742718073869cc39701ff4 to your computer and use it in GitHub Desktop.
[Run command in running container] run command in running container #docker #shell
# 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