> If you’re trying to learn Docker you will first have to master its various terminal commands.<p>This is completely the wrong way to go about learning Docker. The biggest problem with Docker is that there are too many people using it who claim they know Docker because they learnt a few commands they read on the internet, but they don't actually understand what a container is. In reality, this leads to all sorts of problems, like the deployment of insecure containers in the wild. Guides like this are recipe for disaster.
The problem with these kind of Docker "recipe books" is users very quickly build up an unmanageable number of containers, images, networks, volumes etc. on their Docker hosts. When these users inevitably run into unexpected behaviour (or run out of disk space) their only solution is to "destroy the world" with some other recipe like a "docker prune".<p>I see similar things with git users who only learn recipes. I die a little inside every time I see someone fix their problems by deleting and recloning the repo because that's what it says to do on "ohshitgit.com".
I prefer Docker Compose to script all my docker tasks. It's easy, requires some understanding first (ie: environment variables) but after that you have reusable recipes.
I personally find the interactive switch very useful to actually control the container. You can use "-it" flag for this.<p><pre><code> docker run -it [IMAGE_NAME] [ENTRYPOINT] </code></pre>
e.g.<p><pre><code> docker run -it ubuntu:xenial /bin/bash</code></pre>