changing name to db-container now it works
This commit is contained in:
17
db-container/Dockerfile
Normal file
17
db-container/Dockerfile
Normal 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
1
db-container/crontab
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* * * * * root pg_dump -a --user=pa --table=person --table=refimg --table=person_refimg_link > /tmp/new_users.sql
|
||||||
Reference in New Issue
Block a user