Skip to content

Commit 5e3420a

Browse files
committed
update document for using docker-compose
1 parent 899ed16 commit 5e3420a

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313

1414
dev:
15-
container_name: imageserver
16-
image: plotly/imageserver:1.0.0
15+
container_name: imagetest
16+
image: plotly/imageserver:latest
1717
volumes:
1818
- .:/var/www/streambed/image_server/plotly.js
1919
ports:

test/image/README.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22

33
Test plotly.js with the Plotly Image-Server docker container.
44

5-
### Run the container
65

6+
### Run the container with `docker compose`
7+
8+
Plotly.js uses `docker-compose` to ease the creation/stopping/deletion of testing docker container,
9+
please refer [installing docker-compose](https://docs.docker.com/compose/install/) for installation.
710
Inside your `plotly.js` directory, run
811

912
```bash
10-
docker run -d --name imagetest \
11-
-v $PWD:/var/www/streambed/image_server/plotly.js \
12-
-p 9010:9010 -p 2022:22 plotly/imageserver:[version]
13+
$ docker-compose up -d
1314
```
1415

15-
where `[version]` is the latest Plotly Image-Server docker container version
16+
In the `docker-compose.yml` file, `latest` is the latest Plotly Image-Server docker container version
1617
as listed on
1718
[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/) and
1819
`imagetest` is the name of the docker container.
1920

21+
2022
### Run the tests
2123

2224
Inside your `plotly.js` directory, run
@@ -70,16 +72,20 @@ docker images
7072
docker ps -a
7173
```
7274

73-
### Stop container
75+
### Stop your testing container
76+
77+
Inside your `plotly.js` directory, run
7478

7579
```bash
76-
docker stop [container_id]
80+
docker-compose stop
7781
```
7882

79-
### Remove container
83+
### Remove your testing container
84+
85+
Inside your `plotly.js` directory, run
8086

8187
```bash
82-
docker rm [container_id]
88+
docker-compose rm -f
8389
```
8490

8591
For more comprehensive information about docker, please refer to [docker document](http://docs.docker.com/)

0 commit comments

Comments
 (0)