forked from borgmatic-collective/docker-borgmatic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (56 loc) · 1.51 KB
/
Dockerfile
File metadata and controls
57 lines (56 loc) · 1.51 KB
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
FROM alpine:3.15 as builder
LABEL mainainer='b3vis'
COPY requirements.txt /requirements.txt
RUN apk upgrade --no-cache \
&& apk add --no-cache \
alpine-sdk \
python3-dev \
py3-pip \
py3-pkgconfig \
openssl-dev \
lz4-dev \
acl-dev \
linux-headers \
fuse-dev \
attr-dev \
py3-wheel \
&& pip3 install --no-cache-dir -U -r requirements.txt
FROM alpine:3.15
LABEL mainainer='b3vis'
COPY --chmod=755 entry.sh /entry.sh
RUN apk upgrade --no-cache \
&& apk add --no-cache \
tzdata \
sshfs \
python3 \
openssl \
fuse \
ca-certificates \
lz4-libs \
libacl \
postgresql-client \
mariadb-client \
mongodb-tools \
curl \
findmnt \
logrotate \
bash \
bash-completion \
&& rm -rf /var/cache/apk/*
VOLUME /mnt/source
VOLUME /mnt/borg-repository
VOLUME /etc/borgmatic.d
VOLUME /root/.borgmatic
VOLUME /root/.config/borg
VOLUME /root/.ssh
VOLUME /root/.cache/borg
COPY --from=builder /usr/lib/python3.9/site-packages /usr/lib/python3.9/
COPY --from=builder /usr/bin/borg /usr/bin/
COPY --from=builder /usr/bin/borgfs /usr/bin/
COPY --from=builder /usr/bin/borgmatic /usr/bin/
COPY --from=builder /usr/bin/generate-borgmatic-config /usr/bin/
COPY --from=builder /usr/bin/upgrade-borgmatic-config /usr/bin/
COPY --from=builder /usr/bin/validate-borgmatic-config /usr/bin/
RUN borgmatic --bash-completion > /usr/share/bash-completion/completions/borgmatic
RUN echo "source /etc/profile.d/bash_completion.sh" > /root/.bashrc
CMD ["/entry.sh"]