DEV Community

Discussion on: My Docker aliases / cheat-sheet

Collapse
 
vhorvath profile image
Viktor Horvath

Nice post some of these are very useful when you Docker all day!

I want to point out one caveat. When you alias the command the <tab> completion defaults to the list of files in the current directory. Aliased commands do not know the context anymore. This is not a problem for the aliases that do not require a subject (most of them). However, with the rest you will need to lookup and type in the subject name / container id. You will also lose the ability to peek at the list as you type by hitting <tab>.

For instance, when you do docker container inspect <container-name> it takes this without alias: doc<tab> conta<tab> in<tab> <tab: listing of container names> and then continue typing partial container name <tab> to complete.

Tab completion also saves you from typos. Docker did a good job making sure you can use it wherever you need to.