Created
December 14, 2016 09:31
-
-
Save wimvds/c079b38deeb48319dca4f47d264b2049 to your computer and use it in GitHub Desktop.
Run mysql command in (currently running) mariadb docker container
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
#!/bin/bash | |
if [ -t 0 ]; then | |
# Terminal input (keyboard) - interactive | |
docker exec -it mariadb mysql $@ | |
else | |
# File or pipe input - non-interactive | |
docker exec -i mariadb mysql $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment