Adopt Compose v2 (#240)

* Adopt Compose v2

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De loof
2022-05-10 11:59:25 +02:00
committed by GitHub
parent bc95525543
commit 667bd9facb
79 changed files with 237 additions and 237 deletions

View File

@@ -9,10 +9,10 @@ Project structure:
| | └── ...
│   ├── ...
│   └── Dockerfile
└── docker-compose.yaml
└── compose.yaml
```
[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
web:
@@ -28,7 +28,7 @@ services:
```
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).
When deploying the application, docker-compose maps the container port 80 to port 80 of the host as specified in the file.
When deploying the application, docker compose maps the container port 80 to port 80 of the host as specified in the file.
Make sure port 80 on the host is not being used by another container, otherwise the port should be changed.
> **_INFO_**
@@ -36,10 +36,10 @@ Make sure port 80 on the host is not being used by another container, otherwise
> You still can use the MS SQL Server image by uncommenting the following line in the Compose file
> `#image: mcr.microsoft.com/mssql/server`
## Deploy with docker-compose
## Deploy with docker compose
```
$ docker-compose up -d
$ docker compose up -d
Creating network "aspnet-mssql_default" with the default driver
Building web
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
Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```