This repository has been archived on 2021-08-31. You can view files and clone it, but cannot push or open issues or pull requests.
mattermost/db/Dockerfile

33 lines
880 B
Docker
Raw Normal View History

FROM postgres:9.4-alpine
ENV DEFAULT_TIMEZONE UTC
2016-04-20 05:50:19 +02:00
# 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 \
2018-04-15 00:34:49 +02:00
py-pip \
py-cryptography \
pv \
2020-02-07 10:53:12 +01:00
libressl-dev \
&& pip --no-cache-dir install -c pip-constraints.txt 'wal-e<1.0.0' envdir \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
2016-04-20 05:50:19 +02:00
# Add wale script
COPY setup-wale.sh /docker-entrypoint-initdb.d/
2016-04-20 05:50:19 +02:00
2018-04-15 19:33:49 +02:00
#Healthcheck to make sure container is ready
HEALTHCHECK CMD pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || exit 1
2018-04-15 19:33:49 +02:00
# Add and configure entrypoint and command
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
2016-04-20 05:50:19 +02:00
CMD ["postgres"]
2018-04-15 19:33:49 +02:00
VOLUME ["/var/run/postgresql", "/usr/share/postgresql/", "/var/lib/postgresql/data", "/tmp", "/etc/wal-e.d/env"]