Skip to content

Instantly share code, notes, and snippets.

@rifki
Last active June 20, 2019 17:31
Show Gist options
  • Save rifki/8eded75fa373542e14d79f4c98ebeff7 to your computer and use it in GitHub Desktop.
Save rifki/8eded75fa373542e14d79f4c98ebeff7 to your computer and use it in GitHub Desktop.
run script from host to docker
# run script to container Docker
# -u 0 => root
docker exec -u 0 -ti CONTAINERID python /path/to/shell-scripts/script.py
# ssh to docker as root
# -u 0 => root
docker exec -u 0 -it CONTAINERID /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment