LoginSignup
0
0

More than 5 years have passed since last update.

ローカルにService DiscoveryできるConsulを入れた

Posted at
version: '3'

services:

  consul:
    image: consul:latest
    ports:
      - "8400:8400"
      - "8500:8500"
      - "8600:8600"
      - "8600:8600/udp"
    command: "agent -server -bootstrap-expect 1 -ui -client 0.0.0.0"

  registrator:
    image: gliderlabs/registrator:latest
    network_mode: "host"
    depends_on:
      - consul
    volumes:
        - "/var/run/docker.sock:/tmp/docker.sock"
    command: consul://localhost:8500

networks: 
  default:
    ipam:
      config:
        - subnet: "172.30.0.0/16"

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0