26 lines
414 B
Docker
26 lines
414 B
Docker
FROM golang:1.20-alpine3.17 as builder
|
|
|
|
WORKDIR /usr/src/ytdl-web
|
|
|
|
COPY . .
|
|
|
|
RUN go install github.com/go-task/task/v3/cmd/task@latest \
|
|
&& task deps \
|
|
&& task build
|
|
|
|
|
|
FROM alpine:3.17
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache yt-dlp==2023.03.04 ffmpeg==5.1.3
|
|
|
|
COPY --from=builder /usr/src/ytdl-web/ytdl-web ./ytdl-web
|
|
|
|
EXPOSE 8080
|
|
|
|
ENV \
|
|
YTDL_PORT=8080 \
|
|
YTDL_LISTEN=0.0.0.0
|
|
|
|
ENTRYPOINT [ "ytdl-web" ] |