On-Demand Distributions
One of the aspects of Docker I often forget is how wonderfully easy it is to bring up a Linux console on your distribution of choice. This can be incredibly useful if you need to run a specific command, test an idea, or perhaps check that a distribution supports some functionality you require.
For example, you can launch a console on Ubuntu 20.10 by running:
docker run -i -t ubuntu:20.10
If you need access to your local files, this can be updated to expose your current working directory to the container as follows:
docker run -i -t -v ${PWD}:/mnt ubuntu:20.10
For inquiring minds, the flags in use are:
-i, --interactive Keep STDIN open even if not attached
-t, --tty Allocate a pseudo-TTY
-v, --volume list Bind mount a volume