Some of the docker aliases use functions found in the docker plugin. If the plugin is not enabled, these aliases do not work. This commit only defines the aliases if the plugin is enabled.
Also changed: `dkelc` now creates an explicit login shell, has the synonym `dkbash` and uses no backticks. Reason: on some docker images the status as login-shell is not set automatically, which causes e.g. `/etc/bash.bashrc` and `/etc/profile` not to be loaded in these images.
Note: There should be a convenience function in `lib/helpers.bash` that checks if a plugin is available/enabled/disabled. The if-statement if rather clonky.
Due to use of double-quotes ``docker ps`` was executed when the aliases
were loaded and as a consequence ``dklcip`` would always show IP of a
container that was last then instead of at runtime.
This changes the alias to use single quotes which fixes that.
It also changes the alias to use docker's ``--format`` option so
there's no need of parsing the output using grep and cut.
The docker images subcommand was returning all columns due to unescaped
'$3' in awk filter. This was throwing a lot of errors as rmi tried to
remove non-existent images.
In any case docker images has a flag to filter and only show dangling
image IDs which makes this simpler.