通常来讲,运行docker 须要Linux基础。node
docker
有EE
与CE
版本,CE
又分为 stable
, test
, 和 nightly
三个更新频道。每六个月发布一个 stable
版本linux
macos 上docker 运行使用 docker desktop
。推荐使用brew
安装git
brew update
brew cask install docker
复制代码
须要先安装 brew github
Docker 对于Ubuntu系统有以下须要docker
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
复制代码
2. 安装
复制代码
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
复制代码
deb
包。sudo dpkg -i /path/to/package.deb
复制代码
macOS上的Docker Desktop已经有docker-compose
无需安装 Linux 安装shell
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
复制代码
sudo chmod +x /usr/local/bin/docker-compose
复制代码
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
复制代码
镜像地址参考 Docker @ Elasticmacos
docker pull docker.elastic.co/kibana/kibana:7.3.0
docker.elastic.co/elasticsearch/elasticsearch:7.3.0
复制代码
version: '3'
services:
kibana:
image: docker.elastic.co/kibana/kibana:7.3.0
container_name: kibana73
environment:
- I18N_LOCALE=zh-CN
- XPACK_GRAPH_ENABLED=true
- TIMELION_ENABLED=true
- XPACK_MONITORING_COLLECTION_ENABLED="true"
ports:
- "5601:5601"
networks:
- es73net
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.3.0
container_name: es73
environment:
- cluster.name=geektime
- node.name=es73
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.seed_hosts=es73
- cluster.initial_master_nodes=es73
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es73data1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- es73net
volumes:
es73data1:
driver: local
networks:
es73net:
driver: bridge
复制代码
docker-compose -f path/to/docker-compose.yaml up
复制代码
访问http://127.0.0.1:5601验证kibanabootstrap
完成!ubuntu