tikiwiki/Dockerfile

64 lines
1.5 KiB
Docker
Raw Normal View History

2023-04-10 21:59:09 +02:00
FROM debian:stable-slim
2023-04-11 21:48:35 +02:00
ARG BRANCH=25.x
ARG UID=1000
ARG GID=1000
2023-04-10 21:59:09 +02:00
RUN apt update && apt dist-upgrade -y
RUN apt-get -y install lsb-release ca-certificates curl
RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
RUN apt-get update
RUN apt install -y \
php7.4-dom php7.4-gd php7.4-curl php7.4-intl php7.4-zip php7.4-bcmath \
sqlite3 php7.4-sqlite3 build-essential elinks unzip xlsx2csv psutils \
php7.4-memcached php7.4-memcached php7.4-opcache php7.4-intl php7.4-gd \
php7.4-mysql php7.4-ldap php7.4-dom php7.4-zip php7.4-ldap \
2023-04-11 21:48:35 +02:00
php7.4-fpm php7.4-mysql php7.4-mbstring php7.4-bz2 \
php-dompdf \
2023-04-10 21:59:09 +02:00
composer curl
RUN apt install -y \
apache2 apache2-utils libapache2-mod-php7.4
RUN a2enmod rewrite alias authz_user ssl
2023-04-11 21:48:35 +02:00
RUN apt install -y \
tesseract-ocr
2023-04-10 21:59:09 +02:00
2023-04-11 21:48:35 +02:00
ADD start.sh /start.sh
2023-04-10 21:59:09 +02:00
2023-04-11 21:48:35 +02:00
ADD entrypoint.sh /entrypoint.sh
2023-04-10 21:59:09 +02:00
2023-04-11 21:48:35 +02:00
RUN addgroup --gid ${GID} tikiwiki
2023-04-10 21:59:09 +02:00
2023-04-11 21:48:35 +02:00
RUN adduser \
--system \
--uid ${UID} \
--gid ${GID} \
--shell /usr/sbin/nologin \
--gecos 'Tikiwiki' \
--disabled-password \
--home /var/www/html/tiki \
tikiwiki
2023-04-10 21:59:09 +02:00
2023-04-11 21:48:35 +02:00
RUN adduser www-data tikiwiki
WORKDIR /var/www/html/tiki
USER tikiwiki
RUN git clone -b ${BRANCH} https://gitlab.com/tikiwiki/tiki.git .
USER root
RUN mkdir -p files/forums && chmod -R 777 files/forums
2023-04-10 21:59:09 +02:00
VOLUME ["/uploads"]
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
CMD "/start.sh"