Writing a dockerfile
What is a Dockerfile?
- A Dockerfile is a text file which contains a series of commands or instructions.
- These instructions are executed in the order in which they are written.
- Execution of these instructions takes place on a base image.
- On building the Dockerfile, the successive actions form a new image from the base parent image.
We will go through each of instructions under Dockerfile and see how it is used.
- Lab #1: Installing GIT
- Lab #2: ADD instruction
- Lab #3: COPY instruction
- Lab #4: CMD instruction
- Lab #5: ENTRYPOINT instruction
- Lab #6: WORKDIR instruction
- Lab #7: RUN instruction
- Lab #8: ARG instruction
- Lab #9: EXPOSE instruction
- Lab #10: VOLUME instruction
- Lab #11: EXPOSE instruction
- Lab #12: LABEL instruction
- Lab #13: ONBUILD instruction
- Lab #14: HEALTHCHECK instruction
- Lab #15: SHELL instruction
- Lab #16: Entrypoint Vs RUN
- Lab #17: USER instruction
- Writing Dockerfile with Hello Python Script Added
Let's proceed: