2020-02-08 20:44:46 +08:00

14 lines
365 B
Docker

FROM golang:alpine as builder
COPY . $GOPATH/src/github.com/rylio/ytdl/
RUN apk update && apk upgrade && \
apk add --no-cache git
RUN go get -d github.com/rylio/ytdl/cmd/ytdl/
RUN apk del git
WORKDIR $GOPATH/src/github.com/rylio/ytdl/cmd/ytdl/
RUN go build -o /go/bin/ytdl
FROM alpine
COPY --from=builder /go/bin/ytdl /go/bin/ytdl
ENTRYPOINT ["/go/bin/ytdl"]