Dockerfiles Flashcards
1
Q
Dockerfile FROM does
A
Required. Indicates the base image to start from.
2
Q
Docker ENV
A
Sets environmental variables. Often includes the version in the image
3
Q
Dockerfile processing order
A
Every command adds an image layer on top, so order matters!
4
Q
Dockerfile RUN
A
Includes CLI commands to run
Use && syntax to add commands without adding a layer
5
Q
Dockerfile EXPOSE
A
The ports that should be open
6
Q
CMD
A
Required, the final command that runs when starting the container.
7
Q
WORKDIR
A
Sets the working directory
Preferred to RUN cd /path/
8
Q
COPY
A
Transfers a local file to the location
9
Q
Are ENVs inherited from upstream images?
A
No.