Skip to content

Instantly share code, notes, and snippets.

@jaircuevajunior
Last active June 7, 2022 22:24
Show Gist options
  • Save jaircuevajunior/a1607d2043d55e0655d96ebb218cd8c6 to your computer and use it in GitHub Desktop.
Save jaircuevajunior/a1607d2043d55e0655d96ebb218cd8c6 to your computer and use it in GitHub Desktop.
Docker Alias

Alias para alguns comandos comuns no docker-compose

Aonde colocar esses códigos?

Se você possui MAC, provavelmente no arquivo ~/.zshrc.

Se você possui Linux, provavelmente ~/.bashrc.

Se você possui Windows, clique aqui

alias dockerup='docker-sync-stack start'
alias workspace='docker-compose exec --user=laradock workspace bash'
alias dockerstop='docker stop $(docker ps -a -q)'
alias dockermysql='docker-compose exec mysql mysql -udefault -psecret default' # conecta no mysql
alias dockermysqldump='docker-compose exec mysql sh -c "mysqldump -udefault -psecret default > /docker-entrypoint-initdb.d/createdb.sql"'
alias dockermysqlimport='docker-compose exec mysql sh -c "mysql -uroot -proot default < /docker-entrypoint-initdb.d/createdb.sql"'
alias dockerclean='docker container prune -f ; docker volume prune -f'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment