December 2018
Beginner
826 pages
22h 54m
English
Starting with the creation of our new container, this was the command we used:
$ sudo docker run -itd --rm alpine /bin/ash
Here, we're telling Docker we want to run a command in a new container:
docker run
We're then informing it that we want it to be interactive, to have a pseudo-TTY, and to start detached (knocking us back to the VM shell):
-itd
Next, we're telling Docker that when the container stops, we want it to automatically remove itself:
--rm
Lastly, we're saying what image (from Docker Hub) we want to use, and what command to ...