-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
38 lines (27 loc) · 870 Bytes
/
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
FROM golang:1.10 AS BUILD
#doing dependency build separated from source build optimizes time for developer, but is not required
#install external dependencies first
# ADD go-plugins-helpers/Gopkg.toml $GOPATH/src/go-plugins-helpers/
ADD /main.go $GOPATH/src/schelly-restic/main.go
RUN go get -v schelly-restic
#now build source code
ADD schelly-restic $GOPATH/src/schelly-restic
RUN go get -v schelly-restic
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y restic
VOLUME [ "/backup-source" ]
VOLUME [ "/backup-repo" ]
EXPOSE 7070
ENV RESTIC_PASSWORD ''
ENV LISTEN_PORT 7070
ENV LISTEN_IP '0.0.0.0'
ENV LOG_LEVEL 'debug'
ENV PRE_POST_TIMEOUT '7200'
ENV PRE_BACKUP_COMMAND ''
ENV POST_BACKUP_COMMAND ''
ENV SOURCE_DATA_PATH '/backup-source'
ENV TARGET_DATA_PATH '/backup-repo'
COPY --from=BUILD /go/bin/* /bin/
ADD startup.sh /
CMD [ "/startup.sh" ]