-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (22 loc) · 791 Bytes
/
Dockerfile
File metadata and controls
27 lines (22 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM postgres:9.6.3
MAINTAINER Matt Beedle <me@mattbeedle.name>
USER root
RUN apt-get update
RUN apt-get install -q -y --force-yes \
cron \
gnupg \
python-pip \
gzip
# AWS Command Line Interface
RUN pip install awscli==1.9.15
# Note that because cron does not seem to know about Docker's environment
# variables, we have to read them in from a file that we write out
# in entrypoint.sh at runtime.
RUN echo "0 */4 * * * env - \`cat /tmp/env.sh\` /bin/bash -c '(cd /code && sh run-backup.sh) >> /code/backups-cron.log 2>>\&1'" | crontab -
RUN mkdir -p /code
WORKDIR /code
ADD entrypoint.sh /code/entrypoint.sh
ADD run-backup.sh /code/run-backup.sh
RUN chmod +x /code/entrypoint.sh
ENTRYPOINT ["sh", "entrypoint.sh"]
CMD [""] # overrides the default from image we inherited from