Dockerfile 626 Bytes
Newer Older
PICHOU Kyâne's avatar
PICHOU Kyâne committed
1
2
3
FROM postgres:9.4-alpine

ENV DEFAULT_TIMEZONE UTC
PICHOU Kyâne's avatar
PICHOU Kyâne committed
4

PICHOU Kyâne's avatar
PICHOU Kyâne committed
5
# Install some packages to use WAL
PICHOU Kyâne's avatar
PICHOU Kyâne committed
6
7
RUN apk add --no-cache \
      build-base \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
8
      curl \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
9
      libc6-compat \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
10
      libffi-dev \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
11
      linux-headers \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
12
      python-dev \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
13
      py-cryptography \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
14
    && curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python \
PICHOU Kyâne's avatar
PICHOU Kyâne committed
15
16
    && pip --no-cache-dir install 'wal-e<1.0.0' envdir \
    && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
PICHOU Kyâne's avatar
PICHOU Kyâne committed
17

PICHOU Kyâne's avatar
PICHOU Kyâne committed
18
# Add wale script
PICHOU Kyâne's avatar
PICHOU Kyâne committed
19
COPY setup-wale.sh /docker-entrypoint-initdb.d/
PICHOU Kyâne's avatar
PICHOU Kyâne committed
20

PICHOU Kyâne's avatar
PICHOU Kyâne committed
21
22
23
# Add and configure entrypoint and command
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
PICHOU Kyâne's avatar
PICHOU Kyâne committed
24
CMD ["postgres"]