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