Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Virtual Machines and Docker
1.
2. Agenda
● What is Virtualization?
● What is Virtualization trying to solve?
● Traditional Virtualization
● What is Docker?
○ Docker vs. Virtual Machine
● Images, Containers and Registry
● Volume Mounting, Port Publishing, Linking
● Docker Compose
● Demo
● Docker Swarm
● Docker Use Cases
3. What is
Virtualization?
What is it trying to
solve?
- Many systems on top of a single
powerful hardware
- Consistency across
environments
- Changing one thing without
affecting the other
11. Docker Image
A snapshot of a Linux filesystem.
Example Docker commands that operate on images:
● images: List all local images
● tag: Tag an image
● pull: Download image from repository
● rmi: Delete a local image (will also remove intermediate images if no
longer used)
12. Docker Container
A running instance of an image.
Example Docker commands that operate on containers:
● ps -a: List all containers (including stopped)
● run: Create a container from an image and execute a command
in it
● rm: Delete a container
● exec: Run a new command in a running container
13.
14. Docker Registry
● A registry that stores and delivers images
● Private Registries
○ Private to user or company
● Public Registries
○ Example: Official Docker Hub Registry (https://hub.docker.com/)
■ Pull images from existing repositories
■ Create your own repositories
■ Push images to your own repositories
15. Mount Volumes
● Shared folders
● docker run –it –v /host/dir:/container/dir ubuntu bash
○ /container/dirinside the container will correspond to /host/dir in the
host
● docker run –it --volumes-from container_name ubuntu bash
○ Run a new container with the same volumes as an existing one
16. Publish Port
● Map ports
● docker run -d -p 8080:80 nginx
○ Map container’s port 80 to host’s port 8080
○ Use the official Nginx image
■ Which is configured to automatically run Nginx inside a container
○ On host, can then browse to http://localhost:8080/ in a web browser to
see the website
17. Dockerfile
- Reusable Images in different
environments (stage, dev, prod)
- Layered Filesystem (AuFS)
- Domain Specific Language
FROM python:3.4
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD . /code/
RUN pip install -r requirements.txt