Hello, Hello! On Linux, we have the option to define aliases, which are like shorthand commands.
With aliases, you can run a command like "docker compose exec api npm start" with a shorter command like "eapi".
The aliases I use the most are:
Aliases for Docker and K8s:
alias c="docker compose"
alias k="kubectl"
alias d="docker"
Useful aliases for Git:
alias gitp="git push && git push --tags"
alias gitd="git describe --tags"
List the last 200 logs from a container:
alias cl="docker compose logs -f --tail=200"
Use assim: cl api
para listar os logs do container api.
Prefix to execute a command:
alias ce="docker compose exec"
Prefix to execute a command in the site container:
alias ces="docker compose exec site"
Pode usar esse alias assim: ces ls
para listar os arquivos na pasta inicial dentro do container.
Execute a Go command in the API container:
alias km="docker compose exec api go run main.go"
Category
Site session