download repository
1
| curl -LOk https://github.com/kzk/docker-compose-efk/archive/master.zip
|
download docker elasticsearch and kibana
1
2
3
4
|
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.2.0
docker run -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.2.0
|
1
2
3
4
5
6
7
|
docker pull docker.elastic.co/kibana/kibana:7.2.0
docker run --link vigilant_villani:elasticsearch -p 5601:5601 {docker-repo}:{version}
docker run --link vigilant_villani:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.2.0
docker run --link goofy_pasteur:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.2.0
|
docker’s contain rename it —> docker run –name
docker run -d –name selenium_hub selenium/hub
enter contain inside —> docker exec -it
进入node容器:
1
2
3
4
5
6
7
8
9
10
11
12
| docker exec -it node /bin/bash
root@c4cc05d832e0:~# ping selenium_hub
PING hub (172.17.0.2) 56(84) bytes of data.
64 bytes from hub (172.17.0.2): icmp_seq=1 ttl=64 time=0.184 ms
64 bytes from hub (172.17.0.2): icmp_seq=2 ttl=64 time=0.133 ms
64 bytes from hub (172.17.0.2): icmp_seq=3 ttl=64 time=0.216 ms
root@c4cc05d832e0:~# ping hub
PING hub (172.17.0.2) 56(84) bytes of data.
64 bytes from hub (172.17.0.2): icmp_seq=1 ttl=64 time=0.194 ms
64 bytes from hub (172.17.0.2): icmp_seq=2 ttl=64 time=0.218 ms
64 bytes from hub (172.17.0.2): icmp_seq=3 ttl=64 time=0.128 ms
|
docker’s communicate with other contain –> docker run –link
https://www.jianshu.com/p/21d66ca6115e
curl -XPOST localhost:40009/v2/api/online/gen