forked from Quadrabee/k8s-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (53 loc) · 1.47 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM alpine:3.15
RUN apk update \
&& apk add --update \
postgresql-client \
mysql-client \
redis \
gnupg \
vim \
zip \
bzip2 \
curl \
bash \
python3 \
py3-pip \
groff \
less \
mailcap \
py-setuptools \
git \
ca-certificates \
&& rm -rf /var/cache/apk/* \
&& curl https://sdk.cloud.google.com | bash -s -- --disable-prompts
RUN pip install python-dateutil
RUN pip install --upgrade awscli==1.25.19 s3cmd==2.2.0 python-magic && \
apk -v --purge del py-pip && \
rm -rf /var/cache/apk/*
ENV PATH="$PATH:/root/google-cloud-sdk/bin/" \
BACKUP_COMPRESS="true"\
BACKUP_COMPRESS_FORMAT="gz"\
BACKUP_ENCRYPT="false"\
BACKUP_ENCRYPT_KEY=""\
BACKUP_ENCRYPT_RECIPIENT=""\
BACKUP_DB=false \
BACKUP_DB_DRIVER="" \
BACKUP_DB_HOST="" \
BACKUP_DB_USER="" \
BACKUP_DB_PASSWORD="" \
BACKUP_DB_DATABASE="" \
BACKUP_DB_EXTRA_ARGS="" \
BACKUP_DATE_FORMAT="+%Y-%m-%d-%H:%M:%S" \
BACKUP_PREFIX="{{DATE}}-" \
BACKUP_UPLOAD="false" \
BACKUP_UPLOAD_METHOD="" \
BACKUP_UPLOAD_GS_KEY_FILE=""\
BACKUP_UPLOAD_GS_PATH="" \
BACKUP_UPLOAD_S3_SECRET_ACCESS_KEY="" \
BACKUP_UPLOAD_S3_ACCESS_KEY_ID=""\
BACKUP_UPLOAD_S3_REGION=""\
BACKUP_UPLOAD_S3_PATH=""\
BACKUP_UPLOAD_S3_ENDPOINT=""
COPY files/init.sh /usr/sbin/
COPY files/backup_scripts /usr/sbin/backup_scripts
CMD ["/usr/sbin/init.sh"]