# syntax=docker/dockerfile:1

FROM joelnb/dumb-init-alpine:3 as runtime
RUN apk update && apk add --no-cache ca-certificates
ENV GIN_MODE=release

RUN GRPC_HEALTH_PROBE_VERSION=v0.3.1 && \
    wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
    chmod +x /bin/grpc_health_probe

COPY ./bin/authserver /usr/local/bin/authserver

CMD ["tail", "-f", "/dev/null"]
