FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive \
    TZ=UTC

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        ca-certificates \
        curl \
        libpq5 \
        nfs-common \
        tzdata \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy the pre-built core binary and default config from the dist output
COPY /dist/ntapinsight_core /app/ntapinsight-core

RUN mkdir -p /app/config /app/mnt /app/logs \
    && chmod +x /app/ntapinsight-core

ENTRYPOINT ["/app/ntapinsight-core"]
