|
2 | 2 |
|
3 | 3 | Test plotly.js with the Plotly Image-Server docker container. |
4 | 4 |
|
5 | | -### Run the container |
6 | 5 |
|
| 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. |
7 | 10 | Inside your `plotly.js` directory, run |
8 | 11 |
|
9 | 12 | ```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 |
13 | 14 | ``` |
14 | 15 |
|
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 |
16 | 17 | as listed on |
17 | 18 | [hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/) and |
18 | 19 | `imagetest` is the name of the docker container. |
19 | 20 |
|
| 21 | + |
20 | 22 | ### Run the tests |
21 | 23 |
|
22 | 24 | Inside your `plotly.js` directory, run |
@@ -70,16 +72,20 @@ docker images |
70 | 72 | docker ps -a |
71 | 73 | ``` |
72 | 74 |
|
73 | | -### Stop container |
| 75 | +### Stop your testing container |
| 76 | + |
| 77 | +Inside your `plotly.js` directory, run |
74 | 78 |
|
75 | 79 | ```bash |
76 | | -docker stop [container_id] |
| 80 | +docker-compose stop |
77 | 81 | ``` |
78 | 82 |
|
79 | | -### Remove container |
| 83 | +### Remove your testing container |
| 84 | + |
| 85 | +Inside your `plotly.js` directory, run |
80 | 86 |
|
81 | 87 | ```bash |
82 | | -docker rm [container_id] |
| 88 | +docker-compose rm -f |
83 | 89 | ``` |
84 | 90 |
|
85 | 91 | For more comprehensive information about docker, please refer to [docker document](http://docs.docker.com/) |
0 commit comments