hako/Containerfile
Vibe Kanban 0afef05099
feat: add yt-dlp support for video downloads
Add a new archiver to download videos using yt-dlp. The new extractor should call the yt-dlp binary to download the video and we should track progress in the output and return code. The default rules should be updated so youtube videos are extracted using this extractor. The extractor default config should get the thumbnail as well (so we don't depend on the thumbnail extractor) and subtitles. Update the dockerfile accordingly so we not only have yt-dlp but it's required dependencies as well. Prefer installing from packages, if possible.
2026-01-29 12:52:29 +01:00

37 lines
1.1 KiB
Docker

# This file is used directly by the goreleaser build
# It is used to build the final container image
# To build the image locally use make build-docker
# Runtime image
FROM alpine:3.20
LABEL maintainer="Felipe Martin <me@fmartingr.com>"
LABEL org.opencontainers.image.source="https://git.nakama.town/fmartingr/hako"
# Install runtime dependencies (yt-dlp and ffmpeg for video archival from Alpine community)
RUN apk add --no-cache \
poppler-utils \
ca-certificates \
tzdata \
&& apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.20/community yt-dlp ffmpeg
# Create non-root user
RUN addgroup -g 1000 hako && \
adduser -D -u 1000 -G hako hako
WORKDIR /app
# Copy binary from goreleaser build context
# With dockers_v2, goreleaser provides the pre-built binary at $TARGETPLATFORM/hako
# The binary already has the webapp embedded via //go:embed
ARG TARGETPLATFORM
COPY ${TARGETPLATFORM}/hako /usr/local/bin/hako
RUN chmod +x /usr/local/bin/hako && \
chown -R hako:hako /app
# Switch to non-root user
USER hako
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/hako"]
CMD ["server", "--config", "/app/config/config.yaml"]