# This Dockerfile embeds a pre-built binary for the given Linux architecture
# Binaries are supplied by GoReleaser.

FROM gcr.io/distroless/static-debian12:nonroot

# TARGETARCH can be "amd64" or "arm64"
ARG TARGETARCH
ARG TARGETVARIANT

WORKDIR /app

COPY linux/${TARGETARCH}/${TARGETVARIANT}/pocket-id /app/pocket-id

EXPOSE 1411
ENV APP_ENV=production

HEALTHCHECK --interval=90s --timeout=5s --start-period=10s --retries=3 CMD [ "/app/pocket-id", "healthcheck" ]

CMD ["/app/pocket-id"]
