diff --git a/Dockerfile b/Dockerfile index a55d79e..67b02f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN opkg-install curl ADD ./config /config/ ONBUILD ADD ./config /config/ -EXPOSE 8300 8301 8302 8400 8500 53/udp +EXPOSE 8300 8301 8301/udp 8302 8302/udp 8400 8500 53/udp VOLUME ["/data"] ENTRYPOINT ["/bin/consul", "agent", "-config-dir=/config"] diff --git a/README.md b/README.md index 84f1725..4681198 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,9 @@ Assuming we're on a host with a private IP of 10.0.1.1, we can start the first h $ docker run -d -h node1 -v /mnt:/data \ -p 10.0.1.1:8300:8300 \ -p 10.0.1.1:8301:8301 \ + -p 10.0.1.1:8301:8301/udp \ -p 10.0.1.1:8302:8302 \ + -p 10.0.1.1:8302:8302/udp \ -p 10.0.1.1:8400:8400 \ -p 10.0.1.1:8500:8500 \ -p 10.0.1.1:8600:53/udp \ @@ -86,7 +88,9 @@ On the second host, we'd run the same thing, but passing a `-join` to the first $ docker run -d -h node2 -v /mnt:/data \ -p 10.0.1.2:8300:8300 \ -p 10.0.1.2:8301:8301 \ - -p 10.0.1.2:8302:8302 \ + -p 10.0.1.1:8301:8301/udp \ + -p 10.0.1.1:8302:8302 \ + -p 10.0.1.1:8302:8302/udp \ -p 10.0.1.2:8400:8400 \ -p 10.0.1.2:8500:8500 \ -p 10.0.1.2:8600:53/udp \ @@ -97,7 +101,9 @@ And the third host with an IP of 10.0.1.3: $ docker run -d -h node3 -v /mnt:/data \ -p 10.0.1.3:8300:8300 \ -p 10.0.1.3:8301:8301 \ - -p 10.0.1.3:8302:8302 \ + -p 10.0.1.1:8301:8301/udp \ + -p 10.0.1.1:8302:8302 \ + -p 10.0.1.1:8302:8302/udp \ -p 10.0.1.3:8400:8400 \ -p 10.0.1.3:8500:8500 \ -p 10.0.1.3:8600:53/udp \