美文网首页
docker-compose创建etcd

docker-compose创建etcd

作者: 夜空最亮的9星 | 来源:发表于2024-01-07 15:20 被阅读0次

案例1

version: '3.8'

services:
  etcd-single:
    image: gcr.io/etcd-development/etcd:v3.4.25
    restart: on-failure
    entrypoint: ["/usr/local/bin/etcd", "--config-file", "/tmp/etcd/conf/etcd.yml"]
    ports:
      - "2379:2379"
      - "2380:2380"
    environment:
      ETCDCTL_API: 3
    volumes:
      - type: bind
        source: /tmp/etcd/single/
        target: /tmp/etcd

案例2

version: '3'

networks:
  web-network:

services:
  docker-etcd:
    hostname: etcd
    image: bitnami/etcd:3.5.5
    volumes:
      - "./etcd/data:/bitnami/etcd/data"
    environment:
      - ALLOW_NONE_AUTHENTICATION=yes
      - ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
    ports:
      - "2379:2379"
      - "2380:2380"
    networks:
      - web-network

  docker-etcdkeeper:
    hostname: etcdkeeper
    image: evildecay/etcdkeeper:v0.7.6
    ports:
      - "8099:8080"
    networks:
      - web-network

相关文章

网友评论

      本文标题:docker-compose创建etcd

      本文链接:https://www.haomeiwen.com/subject/nvigndtx.html