1、RabbitMQ
docker run -d --name rabbitmq3.7.7 -p 5672:5672 -p 15672:15672 -v `pwd`/data:/var/lib/rabbitmq --hostname myRabbit -e RABBITMQ_DEFAULT_VHOST=my_vhost -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin df80af9ca0c9
2、elk 6.8.0 无问题,7.0 以后版本 kibana需要 进入容器后进行相应的配置
ES:
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” elasticsearch:6.8.0
Kibana
docker run -d -p 5601:5601 --name kibana --link elasticsearch:elasticsearch docker.io/kibana:6.8.0
---------------------------------------------
7.0.0以上多节点es,使用docker-compose
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
version: '2.2' services: es01: image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1 container_name: es01 environment: - node.name=es01 - cluster.name=es-docker-cluster - discovery.seed_hosts=es02,es03 - cluster.initial_master_nodes=es01,es02,es03 - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" ulimits: memlock: soft: -1 hard: -1 volumes: - data01:/usr/share/elasticsearch/data ports: - 9200:9200 networks: - elastic es02: image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1 container_name: es02 environment: - node.name=es02 - cluster.name=es-docker-cluster - discovery.seed_hosts=es01,es03 - cluster.initial_master_nodes=es01,es02,es03 - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" ulimits: memlock: soft: -1 hard: -1 volumes: - data02:/usr/share/elasticsearch/data networks: - elastic es03: image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1 container_name: es03 environment: - node.name=es03 - cluster.name=es-docker-cluster - discovery.seed_hosts=es01,es02 - cluster.initial_master_nodes=es01,es02,es03 - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" ulimits: memlock: soft: -1 hard: -1 volumes: - data03:/usr/share/elasticsearch/data networks: - elastic volumes: data01: driver: local data02: driver: local data03: driver: local networks: elastic: driver: bridge
kibana 7.5.1
https://www.elastic.co/guide/en/kibana/current/docker.html
version: '2.2' services: kibana: image: docker.elastic.co/kibana/kibana:7.5.1 volumes: - ./kibana.yml:/myelk/kibana.yml environment: sticsearch.hosts: http//自己的ip:9200 container_name: kibana01 ports: - 5601:5601
此时访问kibana 可能出现Kibana is not ready.此时进入容器修改config (退出容器:exit)
docker exec -it kibana01 /bin/bash
找到 config下的kibana.yml文件修改配置 (参考https://www.cnblogs.com/zlslch/p/6614033.html),主要修改
server.host: "自己的ip" server.port: 5601 elasticsearch.url: "http://自己的ip:9200" kibana.index: ".kibana" server.host 我设置成0.0.0.0 成功了
3、邮件服务器
https://github.com/bestwu/ewomail
新建dockers-compose.yml 文件 并执行,docker-compose up -d
mail: image: bestwu/ewomail hostname: mail.ewomail.com container_name: myewomail restart: always ports: - "25:25" - "143:143" - "587:587" - "993:993" - "109:109" - "110:110" - "465:465" - "995:995" - "80:80" - "2812:2812" - "8080:8080" environment: - LANGUAGE=zh_CN volumes: - ./build/data/mysql:/ewomail/mysql/data - ./build/data/vmail:/ewomail/mail - ./build/data/rainloop:/ewomail/www/rainloop/data - ./build/data/ssl/certs/:/etc/ssl/certs/ - ./build/data/ssl/private/:/etc/ssl/private/ - ./build/data/ssl/dkim/:/ewomail/dkim/