Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:xenial
FROM ubuntu:bionic

ENV DEBIAN_FRONTEND noninteractive

Expand All @@ -7,7 +7,7 @@ RUN groupadd postgres --gid=999 \

ENV GOSU_VERSION 1.7
RUN apt-get -qq update \
&& apt-get -qq install --yes --no-install-recommends ca-certificates wget locales \
&& apt-get -qq install --yes --no-install-recommends ca-certificates wget locales gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& wget --quiet -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
Expand All @@ -17,18 +17,21 @@ RUN apt-get -qq update \
RUN localedef --inputfile ru_RU --force --charmap UTF-8 --alias-file /usr/share/locale/locale.alias ru_RU.UTF-8
ENV LANG ru_RU.utf8

ENV SERVER_VERSION 9.4
ENV SERVER_VERSION 9.6
ENV PATH /usr/lib/postgresql/$SERVER_VERSION/bin:$PATH
ENV PGDATA /data
RUN echo deb http://1c.postgrespro.ru/deb/ xenial main > /etc/apt/sources.list.d/postgrespro-1c.list \
RUN echo deb http://1c.postgrespro.ru/archive/2018_09_03/deb bionic main > /etc/apt/sources.list.d/postgrespro-1c.list \
&& wget --quiet -O- http://1c.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO-1C | apt-key add - \
&& apt-get -qq update \
&& if dpkg -s libpq5 2>/dev/null; then apt-get remove -y libpq5; fi \
&& apt-get install -y libpq5=9.6.*.1C.bionic \
&& apt-get -qq install --yes --no-install-recommends postgresql-common-pro-1c \
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
&& apt-get -qq install --yes --no-install-recommends postgresql-pro-1c-$SERVER_VERSION \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*


RUN mkdir --parent /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d \
&& chown --recursive postgres:postgres /var/run/postgresql "$PGDATA" \
&& chmod g+s /var/run/postgresql
Expand Down