Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Wack63116yNice. Could you elaborate what `$@` does? I'm guessing just pass all arguments to it, but then why would you need it at all?
-
selvapsk476y@Wack Yes, you are right. '$@' pass all arguments to it as bash alias does not support position based parameter passing (indirectly it is possible). The main idea of this alias is to have a shortcut to the docker commands instead of typing the complete one. Hope it clarifies.
-
selvapsk476y@Override Typically we need to remove containers which are intermediate ones (creating while doing docker build) and one by referring its id/name but this shortcut is useful when you want to remove all the containers.
-
Phlisg25246yAlias laradock="cd Docker/laradock"
dc() {
laradock;
docker-compose "$@";
cd -;
}
Useful when working with laradock, from your working project directory you can just write dc up -d nginx and enjoy :D
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
Useful docker aliases
alias dstart='docker start "$@"'
alias dstop='docker stop "$@"'
alias drm='docker rm "$@"'
alias dip='docker inspect --format "{{ .NetworkSettings.IPAddress }}" "$@"'
alias dls="docker ps"
alias dlsa="docker ps -a"
alias dps="docker ps"
alias dimg='docker images "$@"'
alias drestart='docker restart "$@"'
alias dcommit='docker commit "$@"'
alias dinspect='docker inspect "$@"'
alias dlogs='docker logs "$@"'
alias dcp='docker cp "$@"'
alias dinfo='docker info'
alias dcompose='docker-compose "$@"'
alias dlogs='docker logs "$@"'
alias drshell='docker exec -it -u 0 "$@"'
rant
shell
bash
tips
tricks
docker
linux