`
liunancun
  • 浏览: 34405 次
社区版块
存档分类
最新评论

Docker安装

 
阅读更多
安装Docker
参考https://www.runoob.com/docker/centos-docker-install.html
开机启动
systemctl start docker
systemctl enable docker

安装Docker Compose
curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

安装管理工具Portainer
拉取镜像
docker pull portainer/portainer
运行命令
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
汉化运行
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -v /public:/public portainer/portainer

安装管理工具Rancher
docker pull rancher/rancher
创建挂载目录
mkdir -p /docker_volume/rancher_home/rancher
mkdir -p /docker_volume/rancher_home/auditlog
运行命令
docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -v /docker_volume/rancher_home/rancher:/var/lib/rancher -v /docker_volume/rancher_home/auditlog:/var/log/auditlog -e AUDIT_LEVEL=3 rancher/rancher
docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher

在Docker中安装Elasticsearch
镜像列表
https://www.docker.elastic.co
官网说明
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
拉取镜像
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.8.2
运行命令
docker run -p 19200:9200 -p 19300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.8.2

在Docker中安装elasticsearch-head
官网说明
https://github.com/mobz/elasticsearch-head
拉取镜像
docker pull mobz/elasticsearch-head:5
运行命令
docker run -p 9100:9100 mobz/elasticsearch-head:5
创建容器
docker create --name elasticsearch-head -p 9100:9100 mobz/elasticsearch-head:5
启动容器
docker start elasticsearch-head
跨域访问
http.cors.enabled: true
http.cors.allow-origin: "*"

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics