1

I want to use docker to run haproxy, etcd and confd together in a container. What would be the recommended way to achieve this?

This is currently what I have:

FROM haproxy:1.8

COPY ./haproxyconfig/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
###install confd
ADD confd-0.11.0-linux-amd64 /usr/local/bin/confd \
ADD confd /etc/confd
### install etcd
tar zxvf ./tmp/etcd-v3.2.11-linux-amd64.tar.gz 

ADD ./tmp/etcd /usr/local/bin/ \
ADD ./tmp/etcdctl /usr/local/bin/ \
RUN mkdir -p /var/etcd/ \
RUN mkdir -p /var/lib/etcd/ \

confd -onetime -backend etcd -node http://127.0.0.1:2379
WORKDIR /usr/local/etc/haproxy

EXPOSE 80 443 1936 2379 2380
belwood
  • 3,320
  • 11
  • 38
  • 45

0 Answers0