version: '2'
services:
  eureka1:
    networks:
      - eureka-net
    container_name: eureka1
    image: netflixoss/eureka:1.3.1
    ports:
      - "8080:8080"
    environment:
      JAVA_OPTS: "-Deureka.vipAddress=eureka -Deureka.serviceUrl.default=http://eureka2:8080/eureka/v2/ -Deureka.registration.enabled=true"
  eureka2:
    networks:
      - eureka-net
    container_name: eureka2
    image: netflixoss/eureka:1.3.1
    ports:
      - "8081:8080"
    environment:
      JAVA_OPTS: "-Deureka.vipAddress=eureka -Deureka.serviceUrl.default=http://eureka1:8080/eureka/v2/ -Deureka.registration.enabled=true"
networks:
  eureka-net:
    driver: bridge

Add docker compose file for 2-node Eureka cluster
Add docker compose file for 2-node Eureka cluster
