FROM debian:bookworm

RUN apt-get update && apt-get install -y ca-certificates

RUN useradd -m dyndns

COPY entrypoint.sh /home/dyndns/entrypoint.sh
RUN chmod +x /home/dyndns/entrypoint.sh

COPY DynDNS /home/dyndns/DynDNS
COPY .env /home/dyndns/.env

RUN chown -R dyndns:dyndns /home/dyndns
RUN chmod +x /home/dyndns/DynDNS

USER dyndns

WORKDIR /home/dyndns

CMD ["./entrypoint.sh"]