Created
January 28, 2019 02:03
-
-
Save resourcemode/e4258881326cc6b99871b1951e9ddcf7 to your computer and use it in GitHub Desktop.
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
echo "Open bash for docker containers" | |
echo "1.) projectA" | |
echo "2.) projectB" | |
echo -n "Enter the docker number and press [ENTER]: " | |
read choice | |
if [ "$choice" == "1" ]; then | |
choice='projectA' | |
elif [ "$choice" == "2" ]; then | |
choice='projectB' | |
else | |
echo "There is no such container choice" | |
fi | |
echo "Entering bash of $choice" | |
cd projects | |
docker exec -it $choice bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment