-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
979119c
commit 0652e1b
Showing
3 changed files
with
40 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
FROM golang:1.18 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 python:3-alpine | ||
|
||
# Install ffmpeg | ||
RUN apk add ca-certificates ffmpeg | ||
ENV PATH="/bin:${PATH}" | ||
|
||
RUN apk add --no-cache --virtual .pynacl_deps build-base python3-dev libffi-dev | ||
|
||
# Install youtube-dl | ||
RUN pip install yt-dlp | ||
|
||
RUN apk del .pynacl_deps | ||
|
||
# Copy main executable | ||
COPY --from=builder /build/sensibleHub . | ||
ENTRYPOINT [ "./sensibleHub", "-config", "/config/config.json" ] | ||
FROM golang:1.18 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 | ||
# 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 | ||
ENV PATH="/bin:${PATH}" | ||
ENV RUNNING_IN_DOCKER=true | ||
ENTRYPOINT [ "./sensibleHub", "-config", "/config/config.json" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters