|
1 |
| -FROM postgres:11 |
2 |
| - |
3 |
| -ARG DEBIAN_FRONTEND=noninteractive |
4 |
| -ARG BUILD_DEPS='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-wheel' |
5 |
| - |
6 |
| -RUN apt-get update && \ |
7 |
| - apt-get install -y --no-install-recommends \ |
8 |
| - $BUILD_DEPS \ |
9 |
| - gosu \ |
10 |
| - lzop \ |
11 |
| - libpq-dev \ |
12 |
| - pv \ |
13 |
| - python3 \ |
14 |
| - util-linux \ |
15 |
| - # swift package needs pkg_resources and setuptools |
16 |
| - python3-pkg-resources \ |
17 |
| - python3-setuptools \ |
18 |
| - python3-pip && \ |
19 |
| - ln -sf /usr/bin/python3 /usr/bin/python && \ |
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 && \ |
24 |
| - pip install --disable-pip-version-check --no-cache-dir \ |
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 $BUILD_DEPS && \ |
33 |
| - apt-get autoremove -y && \ |
34 |
| - apt-get clean -y |
| 1 | +FROM postgres:11-alpine |
| 2 | + |
| 3 | +ENV WALE_LOG_DESTINATION stderr |
| 4 | +ENV WALE_ENVDIR /etc/wal-e.d/env |
| 5 | + |
| 6 | +RUN mkdir -p $WALE_ENVDIR \ |
| 7 | + && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.5/main' >> /etc/apk/repositories \ |
| 8 | + && apk add --update --virtual .build-deps \ |
| 9 | + git \ |
| 10 | + build-base \ |
| 11 | + libffi-dev \ |
| 12 | + openssl-dev \ |
| 13 | + python3-dev=3.5.6-r0 \ |
| 14 | + linux-headers \ |
| 15 | + && apk add \ |
| 16 | + lzo \ |
| 17 | + pv \ |
| 18 | + util-linux \ |
| 19 | + python3=3.5.6-r0 \ |
| 20 | + && pip3 install --upgrade pip setuptools \ |
| 21 | + && pip install --disable-pip-version-check --no-cache-dir \ |
| 22 | + psycopg2-binary==2.7.6.1 \ |
| 23 | + envdir==1.0.1 \ |
| 24 | + wal-e[aws,azure,google,swift]==1.1.0 \ |
| 25 | + gcloud==0.18.3 \ |
| 26 | + oauth2client==4.1.3 \ |
| 27 | + azure-storage==0.20.0 \ |
| 28 | + && apk del .build-deps \ |
| 29 | + && rm -rf /var/cache/apk/* |
35 | 30 |
|
36 | 31 | COPY rootfs /
|
37 |
| -ENV WALE_ENVDIR=/etc/wal-e.d/env |
38 |
| -RUN mkdir -p $WALE_ENVDIR |
39 | 32 |
|
40 | 33 | ARG PATCH_CMD="python3 /patcher-script.py"
|
41 | 34 | RUN $PATCH_CMD file /bin/create_bucket /patcher-script.d/patch_boto_s3.py
|
42 |
| -RUN $PATCH_CMD file /usr/local/bin/wal-e /patcher-script.d/patch_boto_s3.py |
| 35 | +RUN $PATCH_CMD module wal_e.cmd /patcher-script.d/patch_boto_s3.py |
43 | 36 | RUN $PATCH_CMD module wal_e.worker.worker_util /patcher-script.d/patch_wal_e_s3.py
|
44 | 37 |
|
45 |
| - |
46 | 38 | CMD ["/docker-entrypoint.sh", "postgres"]
|
47 | 39 | EXPOSE 5432
|
0 commit comments