自己写的一个dubbo-admin 的 docker compose 文件

Dockerfile:

FROM tomcat:8.5
MAINTAINER yangyan
WORKDIR /usr/local/tomcat/webapps/
RUN rm -rf ./*
RUN rm -rf ROOT/*
COPY dubbo-admin-2.8.4/ ROOT/

ENV dubbo.registry.address zookeeper://127.0.0.1:2181
ENV dubbo.admin.root.password root
ENV dubbo.admin.guest.password guest

怕时间长了彻底忘记了,记录一下,dubbo-admin.yml:

version: '2'
services:
  zoo1:
    image: zookeeper
    restart: always
    ports:
       - 2181:2181
    environment:
      JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom
      ZOO_MY_ID: 1
      ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
  
  zoo2:
      image: zookeeper
      restart: always
      ports:
          - 2182:2181
      environment:
        JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom
        ZOO_MY_ID: 2
        ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
  zoo3:
      image: zookeeper
      restart: always
      ports:
        - 2183:2181
      environment:
        JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom
        ZOO_MY_ID: 3
        ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
  
  dubbo-admin:
    image: datacreative.cn:5000/dubbo_admin
    ports:
      - 8080:8080
    environment:
        dubbo.registry.address: zookeeper://zoo1:2181?backup=zoo2:2181,zoo3:2181
        dubbo.admin.root.password: root
        dubbo.admin.guest.password: guest
        JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom
    restart: always
    depends_on: 
      - zoo1
      - zoo2
      - zoo3



Leave a Comment

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据