a685cc24e5
Currently the command `docker-compose build` throws an error for building the database because it uses an old pip version. This PR updates pip right before it is called. Anyways this should just be a temporary fix because the image uses Python 2.7 wich out of support since Jan 2020
34 lines
915 B
Docker
34 lines
915 B
Docker
FROM postgres:9.4-alpine
|
|
|
|
ENV DEFAULT_TIMEZONE UTC
|
|
|
|
# Install some packages to use WAL
|
|
RUN echo "azure<5.0.0" > pip-constraints.txt
|
|
RUN apk add --no-cache \
|
|
build-base \
|
|
curl \
|
|
libc6-compat \
|
|
libffi-dev \
|
|
linux-headers \
|
|
python-dev \
|
|
py-pip \
|
|
py-cryptography \
|
|
pv \
|
|
libressl-dev \
|
|
&& pip install --upgrade pip \
|
|
&& pip --no-cache-dir install -c pip-constraints.txt 'wal-e<1.0.0' envdir \
|
|
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
|
|
|
|
# Add wale script
|
|
COPY setup-wale.sh /docker-entrypoint-initdb.d/
|
|
|
|
#Healthcheck to make sure container is ready
|
|
HEALTHCHECK CMD pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || exit 1
|
|
|
|
# Add and configure entrypoint and command
|
|
COPY entrypoint.sh /
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["postgres"]
|
|
|
|
VOLUME ["/var/run/postgresql", "/usr/share/postgresql/", "/var/lib/postgresql/data", "/tmp", "/etc/wal-e.d/env"]
|