By Lukas Aichbauer & Ivan Popovic | February 29, 2024 | 3 min watch


Learn in 162 seconds why you need Docker, what it is all about, and how the three core components work together.
FROM <base-image> – Set the base image for your Dockerfile (e.g. FROM node:18-alpine). You can search for them on Docker Hub
COPY <path-on-host-file-system> <path-in-image-file-system> – Copy files and directories into the final Docker image (e.g. COPY ./package* .).
RUN <command> – Run a command inside your Docker image, but on build time (e.g. RUN npm install)
EXPOSE <port> – Glorified comment telling a developer which ports are used in this Docker image (e.g. EXPOSE 3000)
CMD [<command>, <option>, <...>] – This is the command that will be executed when the container is started (e.g. CMD ["node", "./build/server.js"])