2018-07-01 04:35:53 +00:00
|
|
|
FROM golang:alpine AS base
|
|
|
|
|
|
|
|
RUN apk add -U --no-cache git && \
|
|
|
|
go get github.com/alecthomas/gometalinter && \
|
|
|
|
gometalinter --install
|
|
|
|
|
2018-04-19 06:16:01 +00:00
|
|
|
FROM golang:alpine
|
|
|
|
|
2018-07-01 04:35:53 +00:00
|
|
|
WORKDIR /go/src/github.com/filebrowser/filebrowser
|
|
|
|
|
|
|
|
COPY --from=base /go/bin /go/bin
|
|
|
|
|
2018-04-19 06:16:01 +00:00
|
|
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
|
|
|
sed -i -e "s/v[0-9]\.[0-9]/edge/g" /etc/apk/repositories && \
|
|
|
|
apk --no-cache -U upgrade && apk --no-cache add ca-certificates yarn git curl dos2unix && \
|
|
|
|
go get github.com/GeertJohan/go.rice/rice && \
|
2018-07-01 04:35:53 +00:00
|
|
|
curl -fsSL -o /go/bin/dep $( \
|
2018-04-19 06:16:01 +00:00
|
|
|
curl -s https://api.github.com/repos/golang/dep/releases/latest \
|
|
|
|
| grep "browser_download_url.*linux-amd64\"" \
|
|
|
|
| cut -d : -f 2,3 \
|
|
|
|
| tr -d \" \
|
|
|
|
) && \
|
2018-07-01 04:35:53 +00:00
|
|
|
chmod +x /go/bin/dep && \
|
|
|
|
curl -sL https://git.io/goreleaser -o /go/bin/goreleaser && \
|
|
|
|
chmod +x /go/bin/goreleaser
|