FROM fedora:36

LABEL name="Tracd Standalone Server"
LABEL project="tracd"

EXPOSE 8055

ENV USER_UID=2000
ENV USER_GID=2000

RUN dnf -y install trac httpd-tools ;\
	dnf -y clean all

RUN useradd --shell /sbin/nologin --create-home --home-dir /home/trac --uid $USER_UID trac

WORKDIR /home/trac
USER trac

#htpasswd .htpasswd user
CMD /usr/sbin/tracd --port 8055 --basic-auth="*,.htpasswd,realm" $(ls -d */)

