Writing Dockerfiles
Overview
Teaching: 25 min
Exercises: 10 minQuestions
What is a
Dockerfile
?How do I write my own
Dockerfile
?What are some
Dockerfile
“best practices”?Objectives
Explain what is a
Dockerfile
.Write a
Dockerfile
for one of your own research projects.Use an automated tool to check that your
Dockerfile
conforms with best practices.
Key Points
A
Dockerfile
is a text document that contains all the commands a user could call on the command line to assemble an image.???
The official
Dockerfile
reference is the best resource for writing aDockerfile
.Always use a
Dockerfile
linter, such as fromlatest.io, to make sure that yourDockerfile
conforms to “best practices”.