1
- FROM quay.io/deis/base:v0.3.6
1
+ FROM postgres:11
2
2
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
17
4
18
5
RUN 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 && \
23
6
apt-get update && \
24
7
apt-get install -y --no-install-recommends \
25
8
$buildDeps \
26
9
gosu \
27
10
lzop \
28
- postgresql-$PG_MAJOR=$PG_VERSION \
29
- postgresql-contrib-$PG_MAJOR=$PG_VERSION \
11
+ libpq-dev \
30
12
pv \
31
13
python3 \
32
- postgresql-common \
33
14
util-linux \
34
15
# swift package needs pkg_resources and setuptools
35
16
python3-pkg-resources \
36
- python3-setuptools && \
17
+ python3-setuptools \
18
+ python3-pip && \
37
19
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 && \
43
24
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 && \
52
33
apt-get autoremove -y && \
53
34
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 && \
59
35
rm -rf \
60
36
/usr/share/doc \
61
37
/usr/share/man \
@@ -74,6 +50,7 @@ RUN buildDeps='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-whe
74
50
COPY rootfs /
75
51
ENV WALE_ENVDIR=/etc/wal-e.d/env
76
52
RUN mkdir -p $WALE_ENVDIR
53
+ RUN python3 /patch_wal_e.py
77
54
78
55
CMD ["/docker-entrypoint.sh" , "postgres" ]
79
56
EXPOSE 5432
0 commit comments