Containerizing an app Flashcards
What is containerizing an app?
It is the process of taking an application and configure it to run as a container. It is also called dockerizing
What is the initial goal of containers?
Its all about apps. Its about making apps simple to build ship and run.
What is Dockerfile?
Dockerfile is a file laying on the root and tells Docker how to built it into an image
What it ‘FROM’ in dockerfile?
It is used to specify the base image depending the OS ypu are using
What is ‘LABEL’ at dockerfile?
It is used to define key value pairs and adding custom metadata to the container
What is RUN?
RUN is used to add other packages as a new layer on top of base image.
What is COPY command at Docker file?
The COPY instruction copies in the app files from the build context.
Why when building images bigger is considered bad?
a) More vulnerabilities
b) Bigger surface attacks
What is the builder pattern?
The builder pattern requires two docker files.
a) one for development
b) one for production
What is multi-stage build?
It is the process that you have multiple FROM instructions and each new build stage that comes from can copy artifacts from the previous stages.
What is a cache hit?
Docker when building images uses to save the intermediated layers in its cache. When it builds a new image and find an older layer on the cache, it happens a cache hit.