changing name to db-container now it works

This commit is contained in:
2022-09-17 21:02:00 +10:00
parent 8badc4eeda
commit 19bd4285e1
2 changed files with 18 additions and 0 deletions

17
db-container/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM postgres:latest
USER root
ENV TZ=Australia/Melbourne
RUN truncate -s0 /tmp/preseed.cfg && \
(echo "tzdata tzdata/Areas select Australia" >> /tmp/preseed.cfg) && \
(echo "tzdata tzdata/Zones/Australia select Melbourne" >> /tmp/preseed.cfg) && \
debconf-set-selections /tmp/preseed.cfg && \
rm -f /etc/timezone /etc/localtime && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
apt-get install -y tzdata
## cleanup of files from setup
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && apt-get -y install cron
COPY crontab /etc/crontab
EXPOSE 5432
CMD ["sh", "-c", "cron ; /usr/local/bin/docker-entrypoint.sh postgres"]

1
db-container/crontab Normal file
View File

@@ -0,0 +1 @@
* * * * * root pg_dump -a --user=pa --table=person --table=refimg --table=person_refimg_link > /tmp/new_users.sql