# 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 " 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"]