Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
FROM golang:1.9-alpine as build

RUN apk add --no-cache git

WORKDIR /go/src/github.com/streamlist/streamlist

ARG STREAMLIST_VERSION=unknown

ENV GODEBUG="netdns=go http2server=0"
ENV GOPATH="/go"

RUN go get \
github.com/jteeuwen/go-bindata/... \
github.com/PuerkitoBio/goquery \
Expand All @@ -20,34 +15,26 @@ RUN go get \
github.com/rylio/ytdl \
go.uber.org/zap \
golang.org/x/crypto/acme/autocert

COPY *.go ./
COPY internal ./internal
COPY static ./static
COPY templates ./templates

RUN go fmt && \
go vet --all && \
go-bindata --pkg main static/... templates/...

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -v --compiler gc --ldflags "-extldflags -static -s -w -X main.version=${STREAMLIST_VERSION}" -o /usr/bin/streamlist-linux-amd64

#RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 \
# go build -v --compiler gc --ldflags "-extldflags -static -s -w -X main.version=${STREAMLIST_VERSION}" -o /usr/bin/streamlist-linux-armv7

#RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
# go build -v --compiler gc --ldflags "-extldflags -static -s -w -X main.version=${STREAMLIST_VERSION}" -o /usr/bin/streamlist-linux-arm64

FROM alpine:latest

RUN apk --no-cache add \
curl \
ffmpeg \
wget

WORKDIR /data

COPY --from=build /usr/bin/streamlist-linux-amd64 /usr/bin/streamlist

EXPOSE 80
ENTRYPOINT ["/usr/bin/streamlist"]