首页 > 其他分享 >借助docker-compose在docker中部署单机的elasticsearch和kibana

借助docker-compose在docker中部署单机的elasticsearch和kibana

时间:2023-01-15 01:44:56浏览次数:60  
标签:compose 9200 kibana elasticsearch docker data es

---
version: '3'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.8
    container_name: elasticsearch
    environment:
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./data:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - es
  kibana:
    image: docker.elastic.co/kibana/kibana:7.17.8
    environment:
      ELASTICSEARCH_URL: http://elasticsearch:9200
      ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
      I18N_LOCALE: zh-CN
    networks:
      - es
    depends_on:
      - elasticsearch
    privileged: true
    ports:
      - 5601:5601
networks:                                                                                                   
  es:                                                                                                       
    driver: bridge

这里需要注意的是:
elasticsearch 所映射出来的文件夹./data 的权限一定要是777,否则,无法正常启动。

标签:compose,9200,kibana,elasticsearch,docker,data,es
From: https://www.cnblogs.com/guangdelw/p/17052957.html

相关文章

  • docker之Mysql安装教程
    部署mysql:5.7安装mkdir-p/app/docker/mysql/logmkdir-p/app/docker/mysql/datamkdir-p/app/docker/mysql/confdockerpullmysql:5.7dockerrun-d-p3......
  • Docker部署Java项目运行命令脚本
    项目名称x-schools-server部署教程cd/app/webapps/x-schools-server#全部移除cd/app/webapps/x-schools-serverdockerstop$(dockerps-aqf"name=x-schools-......
  • docker 安装部署初始化
    yuminstall-yyum-utils#下载依赖安装包yummakecachefast#更新yum软件包#设置阿里云的Docker镜像仓库yum-config-manager\--add-repo\ht......
  • 【Elastic Search】ES和Kibana操作
    下载地址:https://www.elastic.co/cn/downloads/也可以下载logstashxxBeats:全品类采集器,搞定所有数据类型,如Filebeat(采集日志和其他数据)准备: 1、启动ES:bin\elasticse......
  • Docker安装与卸载(基本命令)
    title:Docker安装与卸载(基本命令)date:2022-08-2422:54:40tags:-Dockercategories:-DockerDockers的安装搭建参考:https://www.cnblogs.com/j......
  • go-rod docker启动
        ......
  • Dockerfile制作jenkins
    下载jenkins#wget-Ojenkins-2.386.warhttps://mirrors.tuna.tsinghua.edu.cn/jenkins/war/2.386/jenkins.warrun_jenkins.sh#!/bin/bashjava-server-Xms1024m-Xmx102......
  • Dockerfile制作jdk-17
    下载jdk-17#wgethttps://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gzDockerfileFROMubuntu:22.04ENVJAVA_HOME=/usr/local/jdk-17.0.5ENVJRE_HOM......
  • OS + Docker network calico / weave / flannel
    scalico,weave,flannel等开源网络组件 DockerWeaveNetworkhttps://www.cnblogs.com/xiangsikai/p/9900250.htmlWeaveNetwork:属于第三方网络项目。Weave在Docker主......
  • Docker 安装mysql8
    1、获取镜像dockerpullmysql:82、创建数据卷必须创建数据卷,不然容器挂了数据就丢了dockervolumecreatemysql-data#创建dockervolumels#查看所有数据......