Update content
This commit is contained in:
43
slides.md
43
slides.md
@ -55,7 +55,7 @@ layout: center
|
||||
|
||||
- "It works on my machine" is a thing of the past
|
||||
- Containers are lightweight and portable
|
||||
- Boot in milliseconds
|
||||
- "Boot" in milliseconds
|
||||
- Ideal for reproducible dev environments
|
||||
|
||||
---
|
||||
@ -80,12 +80,35 @@ layout: center
|
||||
|
||||
## What is Docker?
|
||||
|
||||
- Written in GO
|
||||
- Uses Client/Server model with REST API (`docker cli` and `dockerd`)
|
||||
- Eco system of tools (Compose, Swarm, etc)
|
||||
- Public Image Registry (Dockerhub)
|
||||
- Docker client typically runs on same machine as server but doesn't have to
|
||||
|
||||
---
|
||||
transition: fade-out
|
||||
layout: center
|
||||
---
|
||||
## What is Docker?
|
||||
|
||||
- A tool to build and run containers
|
||||
- Docker engine runs containers using Linux features:
|
||||
- Containers are exclusive to Linux
|
||||
- Docker engine runs containers using Linux features like:
|
||||
- Namespaces
|
||||
- cgroups
|
||||
- Union file systems
|
||||
- Uses images layered from base -> app code
|
||||
- Container runs from an image layered with base image and application code
|
||||
|
||||
---
|
||||
transition: fade-out
|
||||
layout: center
|
||||
---
|
||||
|
||||
## Common Use Cases
|
||||
- Reproducible Dev environments (dev containers)
|
||||
- Preview/PR environments (ephemeral test environments)
|
||||
- Legacy applications or applications with complex environment setups
|
||||
|
||||
---
|
||||
transition: fade-out
|
||||
@ -94,7 +117,7 @@ layout: center
|
||||
|
||||
## Docker Architecture
|
||||
|
||||
Docker Engine (Server) <-- REST API --> Docker CLI (Client)
|
||||
Docker CLI (Client) <-- REST API --> Docker Engine (Server)
|
||||
|
||||
<img src="https://docs.docker.com/get-started/images/docker-architecture.webp" width="700" />
|
||||
|
||||
@ -139,8 +162,8 @@ layout: center
|
||||
|
||||
## Bind Mount Example
|
||||
```bash
|
||||
$ docker run --mount type=bind,src=/home/mikeconrad/projects/example/app,dst=/app,ro # ro for ReadOnly
|
||||
$ docker run --volume /home/mikeconrad/projects/example/app:dst=/app
|
||||
$ docker run --mount type=bind,src=/home/mikeconrad/projects/example/app,dst=/app,ro nginx # ro for ReadOnly
|
||||
$ docker run --volume /home/mikeconrad/projects/example/app:/app nginx
|
||||
```
|
||||
<!-- https://docs.docker.com/engine/storage/bind-mounts/ -->
|
||||
|
||||
@ -220,14 +243,16 @@ COPY . .
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "start"]
|
||||
```
|
||||
```bash
|
||||
mikeconrad@pop-os:~/projects/demystifying-docker/examples/react
|
||||
$ docker build -t react-app .
|
||||
```
|
||||
|
||||
|
||||
- Starts with a base image
|
||||
- Copy files and install deps
|
||||
- Set default command
|
||||
|
||||
```bash
|
||||
$ docker build -t node-app .
|
||||
```
|
||||
---
|
||||
transition: fade-out
|
||||
layout: center
|
||||
|
Reference in New Issue
Block a user