|
1 |
| -# plotly.js |
| 1 | +# plotly.js image testing |
2 | 2 | -----
|
3 | 3 |
|
| 4 | +Test plotly.js with Plotly Image-Server docker container. |
4 | 5 |
|
5 |
| -The premier high-level javascript graphing library |
| 6 | +### Run the container |
6 | 7 |
|
| 8 | +Under your `plotly.js` folder, run |
| 9 | + |
| 10 | +```bash |
| 11 | +$ docker run -d --name imagetest \ |
| 12 | + -v $PWD:/var/www/streambed/image_server/plotly.js \ |
| 13 | + -p 9010:9010 -p 2022:22 plotly/imageserver:[version] |
| 14 | +``` |
| 15 | + |
| 16 | +where `[version]` is the latest Plotly Image-Server docker container version |
| 17 | +as listed on |
| 18 | +[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/). |
| 19 | + |
| 20 | +### Run the tests |
| 21 | + |
| 22 | +Under your `plotly.js` folder, run |
| 23 | + |
| 24 | +```bash |
| 25 | +$ npm run test-image |
| 26 | +``` |
| 27 | + |
| 28 | +### SSH into docker |
| 29 | + |
| 30 | +```bash |
| 31 | +$ ssh -p 2022 root@localhost # with password `root` |
| 32 | +``` |
| 33 | + |
| 34 | +If you got this error: |
| 35 | + |
| 36 | +``` |
| 37 | +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 38 | +@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ |
| 39 | +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 40 | +IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! |
| 41 | +Someone could be eavesdropping on you right now (man-in-the-middle attack)! |
| 42 | +It is also possible that a host key has just been changed. |
| 43 | +The fingerprint for the ECDSA key sent by the remote host is |
| 44 | +dd:1e:e0:95:8d:ef:06:b8:0f:2f. |
| 45 | +Please contact your system administrator. |
| 46 | +Add correct host key in /home/jh/.ssh/known_hosts to get rid of this message. |
| 47 | +Offending ECDSA key in /home/jh/.ssh/known_hosts:104 |
| 48 | + remove with: ssh-keygen -f "/home/jh/.ssh/known_hosts" -R [localhost]:2022 |
| 49 | +ECDSA host key for [localhost]:2022 has changed and you have requested strict checking. |
| 50 | +Host key verification failed. |
| 51 | +``` |
| 52 | +simply run |
| 53 | + |
| 54 | +```bash |
| 55 | +$ ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022 |
| 56 | +``` |
| 57 | + |
| 58 | +to remove host information. |
7 | 59 |
|
8 | 60 |
|
| 61 | +### List all images |
9 | 62 |
|
10 |
| -## Test Plotly.js with Plot.ly Image-Server docker container |
| 63 | +```bash |
| 64 | +docker images |
| 65 | +``` |
11 | 66 |
|
12 |
| -### Run container |
| 67 | +### List all containers |
13 | 68 |
|
14 | 69 | ```bash
|
15 |
| -$ docker run -d --name your_container_name \ |
16 |
| - -v $PWD/plotlyjs:/var/www/streambed/image_server/plotlyjs \ |
17 |
| - -p 9010:9010 -p 2022:22 plotly/imageserver:[version] |
| 70 | +docker ps -a |
18 | 71 | ```
|
19 | 72 |
|
20 |
| -### Run the test |
| 73 | +### Stop container |
21 | 74 |
|
22 | 75 | ```bash
|
23 |
| -$ docker exec -i your_container_name /bin/bash -c "cd /var/www/streambed/image_server/plotlyjs && npm run test-image" |
24 |
| -``` |
| 76 | +docker stop [container hash] |
| 77 | +``` |
| 78 | + |
| 79 | +### Remove container |
| 80 | + |
| 81 | +```bash |
| 82 | +docker rm [container hash] |
| 83 | +``` |
0 commit comments