From eae821c4913c5bbcf04e8d5e648a0011e12035a8 Mon Sep 17 00:00:00 2001 From: Lucas Vieira Date: Wed, 1 Feb 2017 10:41:40 -0200 Subject: [PATCH] dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..64baca2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:xenial + +LABEL maintainer="lucas@vieira.io" +LABEL version="1.0" + +RUN apt-get -y update \ + && apt-get -y upgrade + +RUN apt-get -y install postgresql-9.5 bucardo jq + +COPY etc/pg_hba.conf /etc/postgresql/9.5/main/ +COPY etc/bucardorc /etc/bucardorc + +RUN chown postgres /etc/postgresql/9.5/main/pg_hba.conf +RUN chown postgres /etc/bucardorc +RUN chown postgres /var/log/bucardo +RUN mkdir /var/run/bucardo && chown postgres /var/run/bucardo +RUN usermod -aG bucardo postgres + +RUN service postgresql start \ + && su - postgres -c "bucardo install --batch" + +COPY lib/entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +VOLUME "/media/bucardo" +CMD ["/bin/bash","-c","/entrypoint.sh"]