Skip to content

Commit

Permalink
update with simple compose with one service exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrah committed Nov 28, 2024
1 parent 325097f commit 45ceff0
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion docs/src/container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,38 @@ docker push <REPOSITORY_NAME_ON_DOCKER_HUB>/<IMAGE_NAME>:<TAG>
You can use other repository services such as [Harbor](https://goharbor.io/)
:::

### 🧪 Exercise 4 - Docker compose migration

### 🧪 Exercise 4 - Docker compose basics
create your HTTPD docker compose deployment with you custom image

::: details solution
docker-compose.yml
``` yml
services:
webservice:
image: myhttpd
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:80"
volumes:
- ./site-data:/usr/local/apache2/htdocs
```

``` bash
$ ls ./site-data
index.html
```

``` bash
$ docker-compose up
Creating network "dockercompose_default" with the default driver
Creating webservice ...
```
:::

### 🧪 Exercise 5 - Docker compose basics

Convert your previous HTTPD image and container with a docker-compose.yml config
::: details solution
Expand Down

0 comments on commit 45ceff0

Please sign in to comment.