Skip to content

Commit

Permalink
dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Vieira committed Feb 2, 2017
1 parent 7d3606c commit eae821c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:xenial

LABEL maintainer="[email protected]"
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"]

0 comments on commit eae821c

Please sign in to comment.