Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Thinned down Docker container. With this new setup container of this …
Browse files Browse the repository at this point in the history
…app takes up only 17MP instead of previous 428MB.
  • Loading branch information
AdemHodzic authored and corny committed Dec 26, 2019
1 parent a392cff commit 92eff6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:alpine
FROM golang:alpine as builder

COPY . $GOPATH/src/github.com/rylio/ytdl/
RUN apk update && apk upgrade && \
Expand All @@ -7,6 +7,7 @@ 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
WORKDIR /ytdl/

ENTRYPOINT ["/go/bin/ytdl"]
FROM alpine
COPY --from=builder /go/bin/ytdl /go/bin/ytdl
ENTRYPOINT ["/go/bin/ytdl"]

0 comments on commit 92eff6f

Please sign in to comment.