-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
26 lines (21 loc) · 901 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM golang:1-alpine as builder
# Build the normal executable
RUN mkdir /build
COPY . /build
WORKDIR /build
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 curl
# Copy main executable
COPY --from=builder /build/sensibleHub .
# Download 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" ]