我想使用docker在容器中同时运行haproxy,etcd和confd。推荐的实现此目标的方法是什么?
这是我目前拥有的:
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