docs: update docs of README.mds.
summary: update command docker compose to docker-compose.
This commit is contained in:
@@ -6,9 +6,10 @@ You can open this sample in the Dev Environments feature of Docker Desktop versi
|
||||
|
||||
[Open in Docker Dev Environments <img src="../open_in_new.svg" alt="Open in Docker Dev Environments" align="top"/>](https://open.docker.com/dashboard/dev-envs?url=https://github.com/docker/awesome-compose/tree/master/vuejs)
|
||||
|
||||
### VueJS
|
||||
### VueJS
|
||||
|
||||
Project structure:
|
||||
|
||||
```
|
||||
.
|
||||
├── compose.yaml
|
||||
@@ -19,6 +20,7 @@ Project structure:
|
||||
```
|
||||
|
||||
[_compose.yaml_](compose.yaml)
|
||||
|
||||
```
|
||||
services:
|
||||
web:
|
||||
@@ -29,6 +31,7 @@ services:
|
||||
- ./vuejs:/project
|
||||
- /project/node_modules
|
||||
```
|
||||
|
||||
The compose file defines an application with one service `vuejs`.
|
||||
When deploying the application, docker compose maps port 8080 of the web service container to port 8080 of the host as specified in the file.
|
||||
Make sure port 8080 on the host is not already being in use.
|
||||
@@ -36,7 +39,7 @@ Make sure port 8080 on the host is not already being in use.
|
||||
## Deploy with docker compose
|
||||
|
||||
```
|
||||
$ docker compose up -d
|
||||
$ docker-compose up -d
|
||||
Creating network "vuejs_default" with the default driver
|
||||
Building web
|
||||
Step 1/8 : FROM node:13.10.1-alpine
|
||||
@@ -49,6 +52,7 @@ Creating vuejs_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
|
||||
@@ -60,8 +64,9 @@ After the application starts, navigate to `http://localhost:80` in your web brow
|
||||

|
||||
|
||||
Stop and remove the containers
|
||||
|
||||
```
|
||||
$ docker compose down
|
||||
$ docker-compose down
|
||||
Stopping vuejs_web_1 ... done
|
||||
Removing vuejs_web_1 ... done
|
||||
Removing network vuejs_default
|
||||
|
Reference in New Issue
Block a user