Merge branch 'master' of github.com:jpetazzo/container.training

This commit is contained in:
Jerome Petazzoni
2018-09-28 19:35:41 -05:00
6 changed files with 10 additions and 50 deletions

View File

@@ -107,9 +107,17 @@ class: pic
class: pic
## Two containers on a single Docker network
![bridge2](images/bridge2.png)
---
class: pic
## Two containers on two Docker networks
![bridge3](images/bridge2.png)
![bridge3](images/bridge3.png)
---

View File

@@ -309,54 +309,6 @@ and *canary deployments*.
---
## Improving the workflow
The workflow that we showed is nice, but it requires us to:
* keep track of all the `docker run` flags required to run the container,
* inspect the `Dockerfile` to know which path(s) to mount,
* write scripts to hide that complexity.
There has to be a better way!
---
## Docker Compose to the rescue
* Docker Compose allows us to "encode" `docker run` parameters in a YAML file.
* Here is the `docker-compose.yml` file that we can use for our "namer" app:
```yaml
www:
build: .
volumes:
- .:/src
ports:
- 80:9292
```
* Try it:
```bash
$ docker-compose up -d
```
---
## Working with Docker Compose
* When you see a `docker-compose.yml` file, you can use `docker-compose up`.
* It can build images and run them with the required parameters.
* Compose can also deal with complex, multi-container apps.
(More on this later!)
---
## Recap of the development workflow
1. Write a Dockerfile to build an image containing our development environment.

BIN
slides/images/bridge1.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 97 KiB

BIN
slides/images/bridge2.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 119 KiB

BIN
slides/images/bridge3.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View File

@@ -110,7 +110,7 @@ div.pic img {
display: block;
margin: auto;
max-width: 1210px;
max-height: 681px;
max-height: 550px;
}
div.pic h1, div.pic h2, div.title h1, div.title h2 {
text-align: center;