10. VM vs Container Architecture
Server
VM VM VM VM
OS OS OS OS
App App App App
Server
Operating System
App App App App
Free Space
(ready for
use)
Container Engine
11. What is Docker?
Docker != Containers
Docker is:
• Docker, Inc. - the company
• Docker - the container runtime
• Docker - the open source project (now called Moby)
Docker runs on Linux, Windows and Mac OS
14. Docker Image
An image is a stopped container
Built out of a manifest file - Dockerfile
Does not have a state and it never changes
Contains a union of layered filesystem
Tags (default: latest)
Dockerfile Image Container
Build Run
15. Dockerfile
FROM sets the Base Image for subsequent instructions
ARG defines a variable that can be passed at build-time
LABEL adds metadata to an image
ENV sets the environment variables
WORKDIR sets the working directory for RUN, CMD, ENTRYPOINT, COPY and ADD
CMD provides defaults for an executing container; one per Dockerfile
RUN executes a command in a new layer
COPY copies files or directories from local source to container filesystem
ADD copies files, directories or tar files from local/remote source to container
filesystem
EXPOSE specifies the ports that a container listens on
ENTRYPOINT allows to configure a container to run as an executable
16. Docker Registry
Registry - collection of repositories
Repository - collection of images
Image - layered filesystem with tags
Registry - Public or Private