Skip to content

Commit 667bd9f

Browse files
authored
Adopt Compose v2 (docker#240)
* Adopt Compose v2 Signed-off-by: Nicolas De Loof <[email protected]>
1 parent bc95525 commit 667bd9f

File tree

79 files changed

+237
-237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+237
-237
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,20 @@ deploying samples of containerized applications with Docker Compose.
8484

8585
### Running a sample
8686

87-
The root directory of each sample contains the `docker-compose.yaml` which
87+
The root directory of each sample contains the `compose.yaml` which
8888
describes the configuration of service components. All samples can be run in
8989
a local environment by going into the root directory of each one and executing:
9090

9191
```console
92-
docker-compose up -d
92+
docker compose up -d
9393
```
9494

9595
Check the `README.md` of each sample to get more details on the structure and
9696
what is the expected output.
9797
To stop and remove all containers of the sample application run:
9898

9999
```console
100-
docker-compose down
100+
docker compose down
101101
```
102102
<!--lint disable awesome-toc-->
103103
## Contribute

angular/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Project structure:
99
│   ├── ...
1010
│   ├── ...
1111
│   ....
12-
└── docker-compose.yaml
12+
└── compose.yaml
1313
```
1414

15-
[_docker-compose.yaml_](docker-compose.yaml)
15+
[_compose.yaml_](compose.yaml)
1616
```
1717
services:
1818
web:
@@ -24,14 +24,14 @@ services:
2424
```
2525
The compose file defines an application with one service `angular`. The image for the service is built with the Dockerfile inside the `angular` directory (build parameter).
2626

27-
When deploying the application, docker-compose maps the container port 4200 to the same port on the host as specified in the file.
27+
When deploying the application, docker compose maps the container port 4200 to the same port on the host as specified in the file.
2828
Make sure port 4200 is not being used by another container, otherwise the port should be changed.
2929

3030

31-
## Deploy with docker-compose
31+
## Deploy with docker compose
3232

3333
```
34-
$ docker-compose up -d
34+
$ docker compose up -d
3535
Creating network "angular_default" with the default driver
3636
Building angular
3737
Step 1/7 : FROM node:10
@@ -63,5 +63,5 @@ After the application starts, navigate to `http://localhost:4200` in your web br
6363
Stop and remove the container
6464

6565
```
66-
$ docker-compose down
66+
$ docker compose down
6767
```
File renamed without changes.

apache-php/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
Project structure:
55
```
66
.
7-
├── docker-compose.yaml
7+
├── compose.yaml
88
├── app
99
   ├── Dockerfile
1010
   └── index.php
1111
1212
```
1313

14-
[_docker-compose.yaml_](docker-compose.yaml)
14+
[_compose.yaml_](compose.yaml)
1515
```
1616
services:
1717
web:
@@ -22,10 +22,10 @@ services:
2222
- ./app:/var/www/html/
2323
```
2424

25-
## Deploy with docker-compose
25+
## Deploy with docker compose
2626

2727
```
28-
$ docker-compose up -d
28+
$ docker compose up -d
2929
Creating network "php-docker_web" with the default driver
3030
Building web
3131
Step 1/6 : FROM php:7.2-apache
@@ -52,5 +52,5 @@ Hello World!
5252

5353
Stop and remove the containers
5454
```
55-
$ docker-compose down
55+
$ docker compose down
5656
```
File renamed without changes.

aspnet-mssql/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Project structure:
99
| | └── ...
1010
│   ├── ...
1111
│   └── Dockerfile
12-
└── docker-compose.yaml
12+
└── compose.yaml
1313
```
1414

15-
[_docker-compose.yaml_](docker-compose.yaml)
15+
[_compose.yaml_](compose.yaml)
1616
```
1717
services:
1818
web:
@@ -28,18 +28,18 @@ services:
2828
```
2929
The compose file defines an application with two services `web` and `db`. The image for the web service is built with the Dockerfile inside the `app` directory (build parameter).
3030

31-
When deploying the application, docker-compose maps the container port 80 to port 80 of the host as specified in the file.
31+
When deploying the application, docker compose maps the container port 80 to port 80 of the host as specified in the file.
3232
Make sure port 80 on the host is not being used by another container, otherwise the port should be changed.
3333

3434
> ℹ️ **_INFO_**
3535
> For compatibility purpose between `AMD64` and `ARM64` architecture, we use Azure SQL Edge as database instead of MS SQL Server.
3636
> You still can use the MS SQL Server image by uncommenting the following line in the Compose file
3737
> `#image: mcr.microsoft.com/mssql/server`
3838
39-
## Deploy with docker-compose
39+
## Deploy with docker compose
4040

4141
```
42-
$ docker-compose up -d
42+
$ docker compose up -d
4343
Creating network "aspnet-mssql_default" with the default driver
4444
Building web
4545
Step 1/13 : FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
@@ -71,5 +71,5 @@ After the application starts, navigate to `http://localhost:80` in your web brow
7171
Stop and remove the containers
7272

7373
```
74-
$ docker-compose down
74+
$ docker compose down
7575
```
File renamed without changes.

django/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
Project structure:
55
```
66
.
7-
├── docker-compose.yml
7+
├── compose.yaml
88
├── app
99
   ├── Dockerfile
1010
   ├── requirements.txt
1111
   └── manage.py
1212
1313
```
1414

15-
[_docker-compose.yml_](docker-compose.yml)
15+
[_compose.yaml_](compose.yaml)
1616
```
1717
services:
1818
web:
@@ -21,10 +21,10 @@ services:
2121
- '8000:8000'
2222
```
2323

24-
## Deploy with docker-compose
24+
## Deploy with docker compose
2525

2626
```
27-
$ docker-compose up -d
27+
$ docker compose up -d
2828
Creating network "django_default" with the default driver
2929
Building web
3030
Step 1/6 : FROM python:3.7-alpine
@@ -48,5 +48,5 @@ After the application starts, navigate to `http://localhost:8000` in your web br
4848

4949
Stop and remove the containers
5050
```
51-
$ docker-compose down
51+
$ docker compose down
5252
```
File renamed without changes.

elasticsearch-logstash-kibana/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
Project structure:
55
```
66
.
7-
└── docker-compose.yml
7+
└── compose.yaml
88
```
99

10-
[_docker-compose.yml_](docker-compose.yml)
10+
[_compose.yaml_](compose.yaml)
1111
```
1212
services:
1313
elasticsearch:
@@ -21,10 +21,10 @@ services:
2121
...
2222
```
2323

24-
## Deploy with docker-compose
24+
## Deploy with docker compose
2525

2626
```
27-
$ docker-compose up -d
27+
$ docker compose up -d
2828
Creating network "elasticsearch-logstash-kibana_elastic" with driver "bridge"
2929
Creating es ... done
3030
Creating log ... done
@@ -50,7 +50,7 @@ After the application starts, navigate to below links in your web browser:
5050

5151
Stop and remove the containers
5252
```
53-
$ docker-compose down
53+
$ docker compose down
5454
```
5555

5656
## Attribution

fastapi/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Project structure:
55
```
6-
├── docker-compose.yaml
6+
├── compose.yaml
77
├── Dockerfile
88
├── requirements.txt
99
├── app
@@ -12,7 +12,7 @@ Project structure:
1212
1313
```
1414

15-
[_docker-compose.yaml_](docker-compose.yaml)
15+
[_compose.yaml_](compose.yaml)
1616
```
1717
services:
1818
api:
@@ -26,7 +26,7 @@ services:
2626
2727
```
2828

29-
## Deploy with docker-compose
29+
## Deploy with docker compose
3030

3131
```shell
3232
docker-compose up -d --build
@@ -49,7 +49,7 @@ After the application starts, navigate to `http://localhost:8000` in your web br
4949

5050
Stop and remove the containers
5151
```
52-
$ docker-compose down
52+
$ docker compose down
5353
```
5454

5555

File renamed without changes.

flask-redis/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Project structure:
99
├── Dockerfile
1010
├── README.md
1111
├── app.py
12-
├── docker-compose.yml
12+
├── compose.yaml
1313
└── requirements.txt
1414
```
1515

16-
[_docker-compose.yml_](docker-compose.yml)
16+
[_compose.yaml_](compose.yaml)
1717

1818
```
1919
services:
@@ -31,10 +31,10 @@ services:
3131
- redis
3232
```
3333

34-
## Deploy with docker-compose
34+
## Deploy with docker compose
3535

3636
```
37-
$ docker-compose up -d
37+
$ docker compose up -d
3838
[+] Running 24/24
3939
⠿ redis Pulled
4040
...
@@ -52,7 +52,7 @@ $ docker-compose up -d
5252
Listing containers must show one container running and the port mapping as below:
5353
```
5454
55-
$ docker-compose ps
55+
$ docker compose ps
5656
NAME COMMAND SERVICE STATUS PORTS
5757
flask-redis-redis-1 "redis-server --load…" redis running 0.0.0.0:6379->6379/tcp
5858
flask-redis-web-1 "/bin/sh -c 'python …" web running 0.0.0.0:5000->5000/tcp
@@ -78,5 +78,5 @@ OK
7878

7979
Stop and remove the containers
8080
```
81-
$ docker-compose down
81+
$ docker compose down
8282
```
File renamed without changes.

flask/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
Project structure:
55
```
66
.
7-
├── docker-compose.yaml
7+
├── compose.yaml
88
├── app
99
   ├── Dockerfile
1010
   ├── requirements.txt
1111
   └── app.py
1212
1313
```
1414

15-
[_docker-compose.yaml_](docker-compose.yaml)
15+
[_compose.yaml_](compose.yaml)
1616
```
1717
services:
1818
web:
@@ -21,10 +21,10 @@ services:
2121
- '5000:5000'
2222
```
2323

24-
## Deploy with docker-compose
24+
## Deploy with docker compose
2525

2626
```
27-
$ docker-compose up -d
27+
$ docker compose up -d
2828
Creating network "flask_default" with the default driver
2929
Building web
3030
Step 1/6 : FROM python:3.7-alpine
@@ -52,5 +52,5 @@ Hello World!
5252

5353
Stop and remove the containers
5454
```
55-
$ docker-compose down
55+
$ docker compose down
5656
```
File renamed without changes.

gitea-postgres/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ This example defines one of the base setups for Gitea. More details on how to cu
55
Project structure:
66
```
77
.
8-
├── docker-compose.yaml
8+
├── compose.yaml
99
└── README.md
1010
```
1111

12-
[_docker-compose.yaml_](docker-compose.yaml)
12+
[_compose.yaml_](compose.yaml)
1313
```
1414
services:
1515
gitea:
@@ -23,13 +23,13 @@ services:
2323
...
2424
```
2525

26-
When deploying this setup, docker-compose maps the gitea container port 3000 to
26+
When deploying this setup, docker compose maps the gitea container port 3000 to
2727
the same port of the host as specified in the compose file.
2828

29-
## Deploy with docker-compose
29+
## Deploy with docker compose
3030

3131
```
32-
$ docker$ compose up -d
32+
$ docker compose up -d
3333
Creating network "gitea-postgres_default" with the default driver
3434
Creating gitea-postgres_db_1 ... done
3535
Creating gitea-postgres_gitea_1 ... done
@@ -58,10 +58,10 @@ Gitea service.
5858
Stop and remove the containers
5959

6060
```
61-
$ docker-compose down
61+
$ docker compose down
6262
```
6363

6464
To remove all Gitea data, delete the named volumes by passing the `-v` parameter:
6565
```
66-
$ docker-compose down -v
66+
$ docker compose down -v
6767
```
File renamed without changes.

0 commit comments

Comments
 (0)