Created
July 19, 2022 19:21
-
-
Save luismts/b2afb44bd93e1a3618e0201f9cfc6f20 to your computer and use it in GitHub Desktop.
Create docker-compose & docker aliases
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 | |
echo " | |
----Commands aliases for Docker Compose | |
alias dc='docker-compose' | |
alias dcps='docker-compose ps' | |
alias dcstart='docker-compose start' | |
alias dcstop='docker-compose stop' | |
alias dcup='docker-compose up -d' | |
----Commands aliases for Docker | |
alias dcrestart='docker-compose restart' | |
alias dexec='docker exec -it docker_php_1' | |
alias dpull='docker pull'" >> ~/.bash_profile; | |
echo "----Commands aliases for Docker\n"; | |
echo "dstart - Start docker containers\n"; | |
echo "dstop - Stop docker containers\n"; | |
echo "drestart - Restart docker containers\n"; | |
echo "dexec COMMAND - Exec command in docker container\n"; | |
echo "dcup - Rebuild docker containers\n"; | |
echo "dpull - Pull(update) all docker images"; | |
. ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment