1.下載compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2.修改檔案的執行許可權
sudo chmod +x /usr/local/bin/docker-compose
3.檢視compose的版本
docker-compose version
相關閱讀
- 安裝docker https://www.docker.com/products/docker-des...
- 安裝 docker-compose https://docs.docker.com/compose/install/
- 如何建立自己的Docker Image - https://www.elastic.co/cn/blog/how-to-make...
- 如何在為docker image安裝 Elasticsearch 外掛 - https://www.elastic.co/cn/blog/elasticsear...
- 如何設定 Docker 網路 - https://www.elastic.co/cn/blog/docker-netw...
- Cerebro 原始碼 https://github.com/lmenezes/cerebro
- 一個開源的 ELK(Elasticsearch + Logstash + Kibana) docker-compose 配置 https://github.com/deviantony/docker-elk
- Install Elasticsearch with Docker https://www.elastic.co/guide/en/elasticsea...
https://github.com/CrazyZard/es-docker-com...附上自己的步驟跟Compose.yaml檔案
cd /var/docker/docker-es-7.3/
docker-compose.yaml
(已測試)
如果宿主機的9000埠被佔用,記得改ports的地址哦
映象加速
PS:映象地址是我阿里雲的,慢點的話換一個
vim /etc/docker/daemon.json { “registry-mirrors”: [“https://rlkv9m88.mirror.aliyuncs.com“] } systemctl daemon-reload systemctl restart docker
相關引數
#啟動 docker-compose up
docker-compose down
docker-compose down -v
docker ps
docker stop Name/ContainerId
docker start Name/ContainerId
$docker rm Name/ID
-f, –force=false; -l, –link=false Remove the specified link and not the underlying container; -v, –volumes=false Remove the volumes associated to the container
$docker rm docker ps -a -q
停止、啟動、殺死、重啟一個容器
$docker stop Name/ID
$docker start Name/ID
$docker kill Name/ID
$docker restart name/ID