forked from masy22/torrent-streamer-IDC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (22 loc) · 761 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
FROM alpine
MAINTAINER [email protected]
#configure go path
ENV GOPATH /root/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
#package
ENV PACKAGE github.com/jpillora/cloud-torrent
ENV PACKAGE_DIR $GOPATH/src/$PACKAGE
#install go and godep, then compile cloud-torrent using godep, then wipe build tools
RUN apk update && \
apk add git go gzip && \
go get github.com/tools/godep && \
mkdir -p $PACKAGE_DIR && \
git clone https://$PACKAGE.git $PACKAGE_DIR && \
cd $PACKAGE_DIR && \
godep go build -ldflags "-X main.VERSION=$(git describe --abbrev=0 --tags)" -o /usr/local/bin/cloud-torrent && \
cd /tmp && \
rm -rf $GOPATH && \
apk del git go gzip && \
echo "Installed $PACKAGE"
#run package
ENTRYPOINT ["cloud-torrent"]