So far you have only opened bags that someone else sealed: hello-world, ubuntu, alpine. That is fine for exploring, but it does not solve the problem from the very first lesson, getting your own program to run the same way on every machine. For that you need to seal your own bag.
Think back to the sealed grocery bag from the first lesson. Someone had to pack that bag: decide what goes in, in what order, and what note to tape to the outside. A Dockerfile is you writing down exactly that packing list, as plain text, one instruction per line. Docker reads it top to bottom and packs the bag accordingly. ...
What you'll learn
- FROM
- RUN
- CMD
docker builddocker imagesdocker rmi
Work through Images and the Dockerfile
Sign in free and open the Docker course. Work through the lesson, and ask the AI tutor when you get stuck.
Read this lesson in your language
Explore other courses
Claude from Zero to Mastery47 lessons, 8.4h
Vibe Coding: Fundamentals12 lessons, 4.5h
Prompt Engineering11 lessons, 6.2h
Python19 lessons, 9.3h
Git13 lessons, 5.9h
Kubernetes14 lessons, 8h
TypeScript18 lessons, 7.7h
Go20 lessons, 12.3h
React17 lessons, 10.2h
Linux17 lessons, 8.5h
Ansible12 lessons, 6.1h
Bash12 lessons, 5.7h
Helm10 lessons, 5.4h
GitLab CI11 lessons, 5.8h
Jenkins11 lessons, 5.3h
PostgreSQL14 lessons, 7.6h
MySQL13 lessons, 6.8h
Web14 lessons, 5.9h
Vibe Coding12 lessons, 5.8h
Vibe Coding: Prototype to Production12 lessons, 5.5h
Vibe Coding: Multi-Agent Engineering12 lessons, 5.3h
Vibe Coding: Advanced Engineering12 lessons, 7.3h