Skip to content

Commit

Permalink
chore: update dockerfile + provider dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
PThorpe92 committed Dec 6, 2024
1 parent b5492d6 commit dae4d4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions provider-middleware/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
ARG FFMPEG_VERSION=7.1
ARG GOLANG_VERSION=1.23.2
ARG YTDLP_VERSION=2024.11.18
ARG YTDLP_VERSION=2024.12.06

FROM mwader/static-ffmpeg:$FFMPEG_VERSION AS ffmpeg

FROM golang:$GOLANG_VERSION AS yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/download/$YTDLP_VERSION/yt-dlp -o /yt-dlp && chmod a+x /yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/download/$YTDLP_VERSION/yt-dlp_linux -o /yt-dlp && chmod a+x /yt-dlp

FROM golang:$GOLANG_VERSION-alpine as builder
WORKDIR /app
Expand All @@ -20,7 +21,7 @@ RUN apk add --no-cache ca-certificates python3 py3-pip && \

COPY --from=builder /app/provider-service /usr/bin/
COPY --from=ffmpeg /ffmpeg /ffprobe /usr/bin/
COPY --from=yt-dlp /yt-dlp /usr/bin
COPY --from=yt-dlp /yt-dlp /usr/bin/

ENV PATH="/usr/bin:${PATH}"

Expand Down
12 changes: 7 additions & 5 deletions provider-middleware/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ARG FFMPEG_VERSION=7.1
ARG GOLANG_VERSION=1.23.2
ARG YTDLP_VERSION=2024.12.06

FROM mwader/static-ffmpeg:$FFMPEG_VERSION AS ffmpeg

FROM golang:$GOLANG_VERSION AS yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/download/2024.11.04/yt-dlp -o /yt-dlp && chmod a+x /yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/download/$YTDLP_VERSION/yt-dlp_linux -o /yt-dlp && chmod a+x /yt-dlp

FROM golang:$GOLANG_VERSION-alpine as builder
WORKDIR /app
Expand All @@ -14,12 +16,12 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o provider-service
FROM golang:$GOLANG_VERSION-alpine3.20 as final
WORKDIR /app
RUN go install github.com/air-verse/air@latest && \
apk add --no-cache ca-certificates python3 py3-pip && \
pip install --break-system-packages requests brotli websockets certifi yt-dlp[default,curl-cffi]
apk add --no-cache ca-certificates python3 py3-pip && \
pip install --break-system-packages requests brotli websockets certifi yt-dlp[default,curl-cffi]

COPY --from=builder /app/provider-service /usr/bin/
COPY --from=ffmpeg /ffmpeg /ffprobe /usr/bin
COPY --from=yt-dlp /yt-dlp /usr/bin
COPY --from=ffmpeg /ffmpeg /ffprobe /usr/bin/
COPY --from=yt-dlp /yt-dlp /usr/bin/

ENV PATH="/usr/bin:${PATH}"
EXPOSE 8081
Expand Down

0 comments on commit dae4d4b

Please sign in to comment.