hako/Containerfile
Felipe M. c33a6010e4
Some checks failed
CI / goreleaser-lint (push) Successful in 12s
CI / format (push) Successful in 2m34s
CI / lint (push) Successful in 5m49s
CI / build (push) Successful in 3m18s
CI / test (push) Successful in 7m4s
Release / release (push) Failing after 5m55s
CI / e2e (push) Successful in 25m30s
ci: copy the release binary from its per-platform context path
goreleaser's dockers_v2 stages artifacts under <os>/<arch>[/<variant>]/ in
the build context, so the Containerfile resolves the binary through
TARGETPLATFORM instead of the context root.

docker-compose consumes the goreleaser-built image, since a plain
`docker build` cannot provide that per-platform context.
2026-09-22 21:33:38 +02:00

23 lines
701 B
Docker

FROM alpine:3.23
LABEL maintainer="Felipe Martin <me@fmartingr.com>"
LABEL org.opencontainers.image.source="https://git.nakama.town/fmartingr/hako"
RUN apk add --no-cache \
poppler-utils \
ca-certificates \
tzdata \
&& apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.23/community yt-dlp ffmpeg
RUN addgroup -g 1000 hako && adduser -u 1000 -G hako -s /bin/sh -D hako
WORKDIR /app
# goreleaser lays the build context out as <os>/<arch>[/<variant>]/hako
ARG TARGETPLATFORM
COPY $TARGETPLATFORM/hako /usr/local/bin/hako
RUN chown -R hako:hako /app
USER hako
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/hako"]
CMD ["server", "--config", "/app/config/config.yaml"]