Dockerfile Flashcards
1
Q
What must be the first command in a Dockerfile? What is the exception?
A
FROM baseImage
The exception is if an ARG
command is used to declare arguments passed to FORM
2
Q
Given the following code:
FROM busybox ENV FOO=/bar WORKDIR
What is the syntax for using FOO as the WORKDIR?
A
WORKDIR ${FOO}
3
Q
What is the purpose of EXPOSE?
A
To document which ports are available for binding so you don’t have to look at the application’s source code