-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 1.06 KB
/
Dockerfile
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
28
29
30
31
32
FROM alpine:latest
WORKDIR /usr/local/backup/
RUN apk add --no-cache bash gawk sed grep bc coreutils curl git openssh openssl
RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache
RUN apk add --no-cache py3-gpgme
RUN pip3 install --upgrade awscli==1.16.67 s3cmd==2.0.2 python-magic python-gnupg
RUN pip3 install git+https://github.com/michael-paddle/backup-base.git@tested
ADD backup-github.sh /usr/local/backup/
ADD backup-github.config /usr/local/backup/
ADD call_base_backup.py /usr/local/backup/
ADD fixtures/encrypt_file.sh /usr/local/backup/fixtures/
RUN chmod a+x /usr/local/backup/fixtures/encrypt_file.sh
ADD config /root/.ssh/
ADD id_rsa /root/.ssh/
RUN chmod 400 /root/.ssh/id_rsa
RUN chmod a+x /usr/local/backup/backup-github.sh
CMD ["/bin/bash", "/usr/local/backup/backup-github.sh"]