From ddd7c8fad0ff0d9200e70b52d9d02860c5d543c4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 10 Jun 2024 14:54:57 +0100 Subject: Feat: CI improvements and GitLab Pages support --- Dockerfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e206260 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +FROM debian:bookworm AS compiler +MAINTAINER Silvio Rhatto + +COPY bin/provision /usr/local/bin +COPY bin/provision.R /usr/local/bin + +RUN apt-get update && \ + apt-get upgrade -y + +RUN /usr/local/bin/provision + +RUN apt-get install git -y + +RUN rm -rf /var/lib/apt/lists/* + +ARG CONTAINER_UID="${CONTAINER_UID:-1000}" +ARG CONTAINER_GID="${CONTAINER_GID:-1000}" +ARG APP="${APP:-compiler}" +ENV APP_BASE="${APP_BASE:-/srv/shared}" + +RUN groupadd -r -g ${CONTAINER_GID} ${APP} && \ + useradd --no-log-init -r -u ${CONTAINER_UID} -g ${APP} ${APP} && \ + mkdir -p /home/${APP} && chown ${APP}. /home/${APP} + +RUN mkdir -p ${APP_BASE} + +RUN chown -R ${APP}.${APP} ${APP_BASE} + +USER ${APP} + +WORKDIR ${APP_BASE} + +FROM debian:bookworm AS site +MAINTAINER Silvio Rhatto + +RUN apt-get update && \ + apt-get upgrade -y + +COPY bin/provision-host /usr/local/bin + +RUN /usr/local/bin/provision-host + +RUN sed -i -e 's///' /etc/apache2/sites-available/onion.conf + +FROM site AS tor + +RUN sed -i -e 's/RunAsDaemon 1/RunAsDaemon 0/' /etc/tor/torrc +RUN sed -i -e 's/HiddenServicePort 80 127.0.0.1:80/HiddenServicePort 80 site:80/' /etc/tor/torrc + +USER debian-tor -- cgit v1.2.3