FROM robinthoni/postgres-multiarch:9.6 RUN apt-get update && apt-get -y install\ cron &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY ./backup/pg_backup.config /etc/pg_backup.config COPY ./backup/pg_backup_rotated.sh /usr/local/bin/pg_backup_rotated.sh COPY ./backup/pg_backup_rotated.cron.sh /etc/cron.daily/pg_backup_rotated COPY ./run.sh /run.sh VOLUME "/var/lib/postgresql/backup" ENTRYPOINT ["/run.sh"] CMD ["postgres"]