diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-06-10 14:54:57 +0100 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-06-10 14:54:57 +0100 |
commit | ddd7c8fad0ff0d9200e70b52d9d02860c5d543c4 (patch) | |
tree | e89c3ff2342f1d8b8afdf10f54172a98ab790420 /Dockerfile | |
parent | 4150c3e091be5d9fb9a7dfaf9fefa80b67679b5a (diff) | |
download | bookup-ddd7c8fad0ff0d9200e70b52d9d02860c5d543c4.tar.gz bookup-ddd7c8fad0ff0d9200e70b52d9d02860c5d543c4.tar.bz2 |
Feat: CI improvements and GitLab Pages support0.0.8
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 50 |
1 files changed, 50 insertions, 0 deletions
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 <rhatto@riseup.net> + +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 <rhatto@riseup.net> + +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/<VirtualHost 127.0.0.1:80>/<VirtualHost *:80>/' /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 |