2023-04-14 11:58:32 -04:00
|
|
|
FROM golang:1.20-alpine3.17 as builder
|
|
|
|
|
|
|
|
WORKDIR /usr/src/ytdl-web
|
|
|
|
|
2023-04-14 12:01:06 -04:00
|
|
|
COPY . .
|
2023-04-14 11:58:32 -04:00
|
|
|
|
2023-04-14 12:01:06 -04:00
|
|
|
RUN go mod download \
|
|
|
|
&& go build -o ytdl-web .
|
2023-04-14 11:58:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:3.17
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-04-14 12:01:06 -04:00
|
|
|
RUN apk add --no-cache yt-dlp==2023.03.04 ffmpeg==5.1.3
|
2023-04-14 11:58:32 -04:00
|
|
|
|
|
|
|
COPY --from=builder /usr/src/ytdl-web/ytdl-web ./ytdl-web
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
ENTRYPOINT [ "ytdl-web" ]
|