FROM alpine:3.23.3

LABEL io.modelcontextprotocol.server.name="io.github.marmotdata/marmot"

RUN apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata
RUN adduser -D -u 10001 marmot

WORKDIR /app

# Copy binary from the goreleaser build
COPY marmot /usr/local/bin/
RUN chmod +x /usr/local/bin/marmot && \
    chown marmot:marmot /usr/local/bin/marmot

USER marmot

EXPOSE 8080

ENTRYPOINT ["/usr/local/bin/marmot"]
CMD ["run"]