-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas Vieira
committed
Feb 2, 2017
1 parent
7d3606c
commit eae821c
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |