FROM ghcr.io/element-hq/lk-jwt-service:0.3.0 AS base

FROM alpine:3.20
RUN apk add --no-cache ca-certificates \
    && addgroup -S livekit-token \
    && adduser -S -D -H -u 65532 -G livekit-token livekit-token
COPY --from=base /lk-jwt-service /lk-jwt-service
COPY dockerfiles/vault-entrypoint.sh /entrypoint.sh
RUN chmod 0755 /entrypoint.sh

USER livekit-token
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/lk-jwt-service"]
