build podsync inside docker

This commit is contained in:
Matej Drobnic
2021-12-28 15:42:08 +02:00
committed by Maksym Pavlenko
parent c1130f3f97
commit 4fa6da6a02
2 changed files with 6 additions and 3 deletions
+6 -2
View File
@@ -1,10 +1,14 @@
FROM alpine:3.10
FROM golang:1.17.5-alpine3.15 AS builder
WORKDIR /app
COPY . /app/
RUN go build -o podsync ./cmd/podsync
FROM alpine:3.10
WORKDIR /app/
RUN wget -O /usr/bin/youtube-dl https://github.com/ytdl-org/youtube-dl/releases/latest/download/youtube-dl && \
chmod +x /usr/bin/youtube-dl && \
apk --no-cache add ca-certificates python ffmpeg tzdata
COPY podsync /app/podsync
COPY --from=builder /app/podsync /app/podsync
ENTRYPOINT ["/app/podsync"]
CMD ["--no-banner"]
-1
View File
@@ -17,7 +17,6 @@ build:
TAG ?= localhost/podsync
.PHONY: docker
docker:
GOOS=linux GOARCH=amd64 go build -o podsync ./cmd/podsync
docker build -t $(TAG) .
docker push $(TAG)