12345678910111213141516171819202122232425262728293031323334 |
- FROM robinthoni/postgres-multiarch:9.6
-
- RUN mv -v /usr/share/postgresql/9.6/pg_hba.conf.sample /usr/share/postgresql/ \
- && ln -sv ../pg_hba.conf.sample /usr/share/postgresql/$PG_MAJOR/
-
- RUN apt-get update && apt-get -y install\
- cron\
- python3\
- python3-pip\
- &&\
- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
- RUN pip3 install -U\
- argparse
-
- RUN mkdir /docker-entrypoint-initdb-core.d
-
- COPY ./docker-entrypoint-initdb-core.d/ /docker-entrypoint-initdb-core.d
-
- 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 ./docker-entrypoint.sh /usr/local/bin/
-
- COPY ./migrate.py /usr/local/bin/
-
- RUN rm -rf /var/log/*
-
- RUN touch /var/log/migrate.py.logs && chmod 777 /var/log/migrate.py.logs
-
- VOLUME "/var/lib/postgresql/backup"
|