1- FROM quay.io/deis/base:v0.3.6
1+ FROM postgres:11
22
3- ENV LANG=en_US.utf8 \
4- PG_MAJOR=9.4 \
5- PG_VERSION=9.4.17-1.pgdg16.04+1 \
6- PGDATA=/var/lib/postgresql/data
7-
8- # Set this separately from those above since it depends on one of them
9- ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH
10-
11- # Add postgres user and group
12- RUN adduser --system \
13- --shell /bin/bash \
14- --disabled-password \
15- --group \
16- postgres
3+ ARG DEBIAN_FRONTEND=noninteractive
174
185RUN buildDeps='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-wheel' && \
19- localedef -i en_US -c -f UTF-8 -A /etc/locale.alias en_US.UTF-8 && \
20- export DEBIAN_FRONTEND=noninteractive && \
21- apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 && \
22- echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
236 apt-get update && \
247 apt-get install -y --no-install-recommends \
258 $buildDeps \
269 gosu \
2710 lzop \
28- postgresql-$PG_MAJOR=$PG_VERSION \
29- postgresql-contrib-$PG_MAJOR=$PG_VERSION \
11+ libpq-dev \
3012 pv \
3113 python3 \
32- postgresql-common \
3314 util-linux \
3415 # swift package needs pkg_resources and setuptools
3516 python3-pkg-resources \
36- python3-setuptools && \
17+ python3-setuptools \
18+ python3-pip && \
3719 ln -sf /usr/bin/python3 /usr/bin/python && \
38- ln -sf /usr/bin/pip3 /usr/bin/pip && \
39- mkdir -p /run/postgresql && \
40- chown -R postgres /run/postgresql && \
41- # setuptools from ubuntu archives is too old for googleapis-common-protos
42- pip install --upgrade setuptools && \
20+ ln -sf /usr/bin/pip3 /usr/bin/pip
21+
22+ # setuptools from ubuntu archives is too old for googleapis-common-protos
23+ RUN pip install --upgrade setuptools && \
4324 pip install --disable-pip-version-check --no-cache-dir \
44- envdir==0.7 \
45- wal-e[aws,azure,google,swift]==v1.0.2 \
46- # pin azure-storage to version wal-e uses (see docker-entrypoint.sh)
47- azure-storage==0.20.0 && \
48- # "upgrade" boto to 2.43.0 + the patch to fix minio connections
49- pip install --disable-pip-version-check --no-cache-dir --upgrade git+https://github.com/teamhephy/boto@88c980e56d1053892eb940d43a15a68af4ebb5e6 && \
50- # cleanup
51- apt-get purge -y --auto-remove $buildDeps && \
25+ envdir==1.0.1 \
26+ wal-e[aws,azure,google,swift]==1.1.0 \
27+ gcloud==0.18.3 \
28+ oauth2client==4.1.3 \
29+ azure-storage==0.20.0
30+
31+ # cleanup
32+ RUN apt-get purge -y --auto-remove $buildDeps && \
5233 apt-get autoremove -y && \
5334 apt-get clean -y && \
54- # package up license files if any by appending to existing tar
55- COPYRIGHT_TAR='/usr/share/copyrights.tar' && \
56- gunzip -f $COPYRIGHT_TAR.gz && \
57- tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright && \
58- gzip $COPYRIGHT_TAR && \
5935 rm -rf \
6036 /usr/share/doc \
6137 /usr/share/man \
@@ -74,6 +50,7 @@ RUN buildDeps='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-whe
7450COPY rootfs /
7551ENV WALE_ENVDIR=/etc/wal-e.d/env
7652RUN mkdir -p $WALE_ENVDIR
53+ RUN python3 /patch_wal_e.py
7754
7855CMD ["/docker-entrypoint.sh" , "postgres" ]
7956EXPOSE 5432
0 commit comments