-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (20 loc) · 874 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
FROM golang:alpine as Tunasync
LABEL maintainer="Jeff"
ENV GO111MODULE on
RUN apk update &&\
apk add --no-cache ca-certificates gcc musl-dev git make &&\
go get -v -d github.com/tuna/tunasync/cmd/tunasync ;\
git clone https://github.com/tuna/tunasync.git /go/src/github.com/tuna/tunasync
RUN cd /go/src/github.com/tuna/tunasync && make
FROM alpine:edge
COPY --from=Tunasync /go/src/github.com/tuna/tunasync/build-linux-amd64 /usr/local/bin
COPY run.sh /run.sh
RUN apk --no-cache add curl wget openssh git rsync ca-certificates &&\
mkdir -p /data/conf /data/mirrors /data/logs ;\
chmod +x /usr/local/bin/tunasync ;\
chmod +x /usr/local/bin/tunasynctl ;\
chmod +x /run.sh
COPY conf /data/conf
VOLUME ["/data/conf","/data/mirrors","/data/logs"]
EXPOSE 12345 6000
ENTRYPOINT ["/bin/sh", "-c","/run.sh"]