Skip to content

Commit

Permalink
Dockerfile: make youtube-dl available under multiple names
Browse files Browse the repository at this point in the history
  • Loading branch information
xarantolus authored Jan 5, 2024
1 parent 14e0848 commit 9392194
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ RUN CGO_ENABLED=0 go build -a -v -mod vendor -ldflags "-s -w" -o sensibleHub .

# Now for the image we actually run the server in
FROM alpine:latest
RUN apk add ca-certificates ffmpeg python3
RUN apk add ca-certificates ffmpeg python3 curl
# Copy main executable
COPY --from=builder /build/sensibleHub .
# Download yt-dlp
RUN wget -qO /bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && chmod +x /bin/yt-dlp

RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && \
chmod a+rx /usr/local/bin/yt-dlp && \
ln /usr/local/bin/yt-dlp /usr/local/bin/youtube-dl && \
ln /usr/local/bin/yt-dlp /usr/local/bin/youtube-dlp && \
ln /usr/local/bin/yt-dlp /usr/local/bin/youtube-dlc && \
ln /usr/local/bin/yt-dlp /usr/local/bin/yt-dlc && \

ENV PATH="/bin:${PATH}"
ENV RUNNING_IN_DOCKER=true
ENTRYPOINT [ "./sensibleHub", "-config", "/config/config.json" ]

0 comments on commit 9392194

Please # to comment.