Volume could be passed to the docker only with absolute path

In addition to that add zookeeper support to the docker.
This commit is contained in:
Alexander Kukushkin
2016-07-01 12:43:33 +02:00
parent dc27a30800
commit b7639f5b22
4 changed files with 29 additions and 20 deletions
+4 -9
View File
@@ -10,7 +10,7 @@ ENV PGVERSION 9.5
ENV PATH /usr/lib/postgresql/${PGVERSION}/bin:$PATH
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y curl jq haproxy postgresql-${PGVERSION} python-psycopg2 python-yaml \
&& apt-get install -y curl jq haproxy zookeeper postgresql-${PGVERSION} python-psycopg2 python-yaml \
python-requests python-six python-click python-dateutil python-tzlocal python-urllib3 \
python-dnspython python-pip python-setuptools python-kazoo python-prettytable python \
&& pip install python-etcd==0.4.3 python-consul==0.6.0 --upgrade \
@@ -34,14 +34,9 @@ ADD extras/confd /etc/confd
RUN ln -s /patronictl.py /usr/local/bin/patronictl
### Setting up a simple script that will serve as an entrypoint
RUN mkdir /data/ && touch /pgpass /patroni.yml /var/run/haproxy.pid \
&& chown postgres:postgres -R /patroni/ /data/ /pgpass /patroni.yml /etc/haproxy /var/run/haproxy.pid \
&& for name in etcd haproxy; do \
for ext in log err; do \
touch /var/log/$name.$ext \
&& chown postgres:postgres /var/log/$name.$ext; \
done; \
done
RUN mkdir /data/ && touch /pgpass /patroni.yml \
&& chown postgres:postgres -R /patroni/ /data/ /pgpass /patroni.yml /etc/haproxy /var/run/ /var/lib/ /var/log/ \
&& echo 1 > /etc/zookeeper/conf/myid
EXPOSE 2379 5432 8008