mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-09-01 00:59:24 +00:00
Reverted pip installation in Dockerfile
As the Dockerfile is there mainly to support developers, we want to build the Dockerfile using the current working directory instead of a previously released version.
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
## This Dockerfile is meant to aid in the building and debugging patroni whilst developing on your local machine
|
||||
## It has all the necessary components to play/debug with a single node appliance, running etcd
|
||||
FROM ubuntu:14.04
|
||||
MAINTAINER Feike Steenbergen <[email protected]>
|
||||
|
||||
# We need curl
|
||||
RUN apt-get update -y && apt-get install curl -y
|
||||
|
||||
# Add PGDG repositories
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
||||
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
RUN apt-get update -y
|
||||
RUN apt-get upgrade -y
|
||||
|
||||
ENV PGVERSION 9.4
|
||||
RUN apt-get install postgresql-${PGVERSION} -y
|
||||
RUN apt-get install python python-psycopg2 python-yaml python-requests python-dnspython python-pip python-mock -y
|
||||
RUN pip install patroni
|
||||
|
||||
|
||||
ENV PATH /usr/lib/postgresql/${PGVERSION}/bin:$PATH
|
||||
|
||||
ENV ETCDVERSION 2.0.13
|
||||
RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION}/etcd-v${ETCDVERSION}-linux-amd64.tar.gz | tar xz -C /bin --strip=1 --wildcards --no-anchored etcd etcdctl
|
||||
|
||||
### Setting up a simple script that will serve as an entrypoint
|
||||
RUN mkdir /patroni/
|
||||
RUN mkdir /data/ && touch /var/log/etcd.log /var/log/etcd.err /pgpass /patroni/postgres.yml
|
||||
RUN chown postgres:postgres -R /patroni/ /data/ /pgpass /var/log/etcd.* /patroni/postgres.yml
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
EXPOSE 4001 5432 2380
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
USER postgres
|
||||
@@ -1,13 +0,0 @@
|
||||
--- Dockerfile 2015-09-03 09:24:16.355412216 +0200
|
||||
+++ Dockerfile.test 2015-09-03 09:25:48.407879693 +0200
|
||||
@@ -15,7 +15,9 @@
|
||||
ENV PGVERSION 9.4
|
||||
RUN apt-get install postgresql-${PGVERSION} -y
|
||||
RUN apt-get install python python-psycopg2 python-yaml python-requests python-dnspython python-pip python-mock -y
|
||||
-RUN pip install patroni
|
||||
+## We install prereqs from pypi, the package from testpypi
|
||||
+RUN pip install --force-reinstall --upgrade kazoo boto python-etcd
|
||||
+RUN pip install -i https://testpypi.python.org/pypi patroni
|
||||
|
||||
|
||||
ENV PATH /usr/lib/postgresql/${PGVERSION}/bin:$PATH
|
||||
@@ -133,5 +133,5 @@ then
|
||||
sleep 60
|
||||
done
|
||||
else
|
||||
exec patroni /patroni/postgres.yml
|
||||
exec python /patroni.py /patroni/postgres.yml
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user