It’s very frustrating for me when I need to provide, especially during development time, the same commands over and over. It’s getting even worst once the command has many arguments attached!
Of course, I am trying to reuse bash search history in the shell via Ctrl+R
as much as I can, but I struggle the most when your history is not populated with the command I am looking for.
That’s why I have defined a few Docker aliases in .bashrc
which allow me to speed up my development time and overall satisfaction as well!
I just would like to make a note about alias named as dex
which will launch a Bourne shell within a container. It has defined /bin/sh
as a shell (default shell enforced by ENTRYPOINT
), but you should change it when your containers are using another shell like /bin/bash
. It depends on how your Dockerfile
is structured around the usage of CMD
and/or ENTRYPOINT
.
To make these aliases available for usage you might do two things
- logout and login once again / restart the computer
OR
- run
source ~/.bashrc
in terminal to take effect immediately