FROM alpine:3.20

LABEL org.opencontainers.image.authors="FairwindsOps, Inc." \
      org.opencontainers.image.vendor="FairwindsOps, Inc." \
      org.opencontainers.image.title="goldilocks" \
      org.opencontainers.image.description="Goldilocks is a utility that can help you identify a starting point for resource requests and limits." \
      org.opencontainers.image.documentation="https://goldilocks.docs.fairwinds.com/" \
      org.opencontainers.image.source="https://github.com/FairwindsOps/goldilocks" \
      org.opencontainers.image.url="https://github.com/FairwindsOps/goldilocks" \
      org.opencontainers.image.licenses="Apache License 2.0"

# Create directories for assets
RUN mkdir -p /templates \
    /static/css \
    /static/js \
    /static/images \
    /static/webfonts

# Copy template files
COPY pkg/dashboard/templates/* /templates/

# Copy static assets
COPY pkg/dashboard/assets/css/* /static/css/
COPY pkg/dashboard/assets/js/* /static/js/
COPY pkg/dashboard/assets/images/* /static/images/

# Copy binary
COPY goldilocks /

# 'nobody' user in alpine
USER 65534

CMD ["/goldilocks"]
