Docker Notes

"Hello, World!".replace("World", "Docker")

What is docker?

Virtual Machines vs Containers

Container

Virtual Machine 

Architecture of Docker

Client server Architecture

Client talks to server ( docker engine ) in rest api

( Container is a process on your machine )

All containers share the same kernel

Since kernels are different in different OS's you can only run linux containers on linux containers etc etc etc.

Windows: Windows and linux

Linux: Linux

Macos: Linux VM (Very light weight)

Installing Docker

docker version

^ to get version

https://docs.docker.com/get-docker

(Docker desktop) (docker engine + other tools)

Download from docker hub

macOS - download and run docker, will appear in top task bar (important) wait for it to show up

WSL 2 Installation is incomplete (Windows)

Click link and download and then restart

( Wait for docker to run )

Run docker version again

Development Workflow

Take a app and dockerise it

Add a docker file 

Includes instructions to make a app into a image

Image contains the following

A cut-down os

A runtime environment

Application files

Third party libs

Env vars

Once we have image

Tell docker to run container with the image

docker run …

You can store images on docker up

Extra Notes