Step 1 of 11
Docker workshop for beginners: what you'll do
In this Docker workshop for beginners you learn the difference between images and containers, then run, stop and remove containers, publish ports and keep data in volumes. You finish by building your own image from a Dockerfile, layer by layer, typing every command in a practice Docker terminal in your browser.
Watch the whole idea in five scenes:
In this lesson you'll:
- see why an image is a read-only template and a container is a running copy of it
- run containers in the background and take them through their life:
docker run,ps,stop,start,rm - reach a container from your computer with
-p 8080:80, and look inside it withdocker logsanddocker exec - keep data in a volume, and build your own image with a
Dockerfileanddocker build
It takes about 75 minutes. Each hands-on step has a practice terminal with a short list of tasks that tick themselves when Docker's state looks right. The terminal is a simulation that answers like Docker does: nothing is downloaded and nothing you type touches a real computer. On a computer with Docker installed, the same commands work the same way (outputs differ in ids, sizes and times).
Takeaway: an image is the template, a container is a running copy, and ports and volumes connect it to the world.