Update Dockerfile for goreleaser

This commit is contained in:
Evan Fiordeliso 2023-04-15 19:54:42 -04:00
parent 632fd80844
commit 00c737f14c
1 changed files with 1 additions and 14 deletions

View File

@ -1,25 +1,12 @@
ARG GO_VERSION="1.20"
ARG ALPINE_VERSION="3.17" ARG ALPINE_VERSION="3.17"
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} as builder
WORKDIR /usr/src/ytdl-web
COPY . .
RUN go install github.com/go-task/task/v3/cmd/task@latest \
&& apk add --no-cache git \
&& task deps \
&& task build
FROM alpine:${ALPINE_VERSION} FROM alpine:${ALPINE_VERSION}
WORKDIR /app WORKDIR /app
RUN apk add --no-cache yt-dlp ffmpeg RUN apk add --no-cache yt-dlp ffmpeg
COPY --from=builder /usr/src/ytdl-web/out/ytdl-web ./ytdl-web COPY ytdl-web ./
EXPOSE 8080 EXPOSE 8080