Slides and code samples for training, tutorials about containers.
The target audience for this tutorial is someone learning containers.
Containers are superior to conventional deployment mechanism in that they are:
- Isolated:
- Applications have their own libraries, no conflicts will arise from different libraries in other applications. Docker uses a technology called namespaces to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.
- Limited (can set limits on CPU/memory):
- Applications may not hog resources from other applications.Docker Engine on Linux also relies on another technology called control groups (cgroups). A cgroup limits an application to a specific set of resources. Control groups allow Docker Engine to share available hardware resources to containers and optionally enforce limits and constraints.
- Portable:
- Container contains everything it needs, not tied to an OS or Cloud.
- Lightweight:
- The kernel is shared making it much smaller and faster than a full OS image.
- on Mac
- on Windows
- on Linux, instructions depends on the linux distribution.
- Build, tag and run a chat server in docker
- Push the chat server image to DockerHub
- Deploy the chat container on a local kubernetes
- Dive into the images
docker run -it --rm jess/hollywood