docs: update docs of README.mds.

summary: update command docker compose to docker-compose.
This commit is contained in:
Mark
2023-01-05 22:29:01 +08:00
parent 20e3e4c434
commit 4b0c67e2aa
40 changed files with 518 additions and 332 deletions

View File

@@ -9,6 +9,7 @@ You can open this sample in the Dev Environments feature of Docker Desktop versi
### Django application in dev mode
Project structure:
```
.
├── compose.yaml
@@ -20,18 +21,19 @@ Project structure:
```
[_compose.yaml_](compose.yaml)
```
services:
web:
build: app
ports:
services:
web:
build: app
ports:
- '8000:8000'
```
## Deploy with docker compose
```
$ docker compose up -d
$ docker-compose up -d
Creating network "django_default" with the default driver
Building web
Step 1/6 : FROM python:3.7-alpine
@@ -45,6 +47,7 @@ Creating django_web_1 ... done
## Expected result
Listing containers must show one container running and the port mapping as below:
```
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
@@ -54,6 +57,7 @@ CONTAINER ID IMAGE COMMAND CREATED
After the application starts, navigate to `http://localhost:8000` in your web browser:
Stop and remove the containers
```
$ docker compose down
$ docker-compose down
```