-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 933 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 933 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
# Dockerfile for time2backup
FROM alpine:latest
ENV BRANCH=stable
ENV VERSION=1.9.1
# 1. Install dependencies
# 2. Download time2backup
# 3. Uncompress it
# 4. Prepare default configuration
RUN apk add --no-cache coreutils bash rsync openssh-client curl && \
curl -o /tmp/time2backup.tgz https://github.com/time2backup/time2backup/releases/download/v$VERSION/time2backup-$VERSION.tar.gz && \
cd /opt && tar zxf /tmp/time2backup.tgz && cp -p /opt/time2backup/config/default.example.conf /opt/time2backup/config/default.conf && \
sed -i 's|^.*default_config_directory =|default_config_directory = /config|' /opt/time2backup/config/default.conf
# install time2backup without error
RUN /opt/time2backup/time2backup.sh install || true
# install entrypoint
COPY entrypoint.sh /
RUN chown -R root:root /entrypoint.sh /opt/time2backup && chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/time2backup"]