2018-01-23 18:01:22 +01:00
|
|
|
FROM ubuntu:latest
|
|
|
|
|
|
|
|
# Labels
|
|
|
|
LABEL maintainer="Paulino Padial <github.com/ppadial>"
|
|
|
|
|
|
|
|
# Environment variables (with default values)
|
2018-01-24 01:08:19 +01:00
|
|
|
ENV CRON_LOG_LEVEL=8
|
2018-01-23 18:01:22 +01:00
|
|
|
|
|
|
|
# Packages installation
|
|
|
|
RUN apt-get update && apt-get upgrade -y && \
|
2018-01-23 19:21:31 +01:00
|
|
|
apt-get install -y autopostgresqlbackup cron bzip2 gzip postgresql-client && \
|
2018-01-23 18:01:22 +01:00
|
|
|
apt-get purge -y --auto-remove && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2018-01-23 18:13:52 +01:00
|
|
|
# Copy files to the image
|
|
|
|
ADD autopostgresqlbackup.conf /etc/default/autopostgresqlbackup
|
2018-01-24 01:07:08 +01:00
|
|
|
ADD autopostgresqlbackup /usr/sbin/autopostgresqlbackup
|
2018-01-24 00:58:29 +01:00
|
|
|
RUN chmod 755 /usr/sbin/autopostgresqlbackup
|
2018-01-23 18:13:52 +01:00
|
|
|
|
2018-01-23 18:01:22 +01:00
|
|
|
# Configure entrypoint
|
|
|
|
ADD docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
|
|
|
|
|
|
# Volumes declaration
|
2018-01-23 18:12:33 +01:00
|
|
|
VOLUME ["/backup"]
|
2018-01-23 18:01:22 +01:00
|
|
|
|
|
|
|
# Start the container process
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|