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-07-01 16:18:04 +02:00
|
|
|
ARG PHP_VERSION=7.4
|
2023-04-11 21:48:35 +02:00
|
|
|
|
2023-04-10 21:59:09 +02:00
|
|
|
RUN apt update && apt dist-upgrade -y
|
|
|
|
|
2023-11-01 21:45:42 +01:00
|
|
|
## Install Diferent PHP version
|
2023-07-01 16:18:04 +02:00
|
|
|
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
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-11-01 21:45:42 +01:00
|
|
|
## IF tesseract
|
|
|
|
#RUN apt install -y \
|
|
|
|
# tesseract-ocr tesseract-ocr-spa sudo
|
|
|
|
|
|
|
|
## IF R
|
|
|
|
#RUN apt install -y r-base r-base-dev r-recommended
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-11-01 21:45:42 +01:00
|
|
|
RUN apt install -y imagemagick ffmpeg python3 \
|
2023-11-20 21:52:04 +01:00
|
|
|
unoconv
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-10-27 17:06:20 +02:00
|
|
|
RUN apt remove -y php-cli && \
|
|
|
|
apt install -y php${PHP_VERSION}-cli
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-10-27 17:06:20 +02:00
|
|
|
RUN apt update -y && apt install -y \
|
|
|
|
php${PHP_VERSION}-gd php${PHP_VERSION}-curl php${PHP_VERSION}-intl php${PHP_VERSION}-zip php${PHP_VERSION}-bcmath \
|
|
|
|
sqlite3 php${PHP_VERSION}-sqlite3 build-essential elinks unzip xlsx2csv psutils
|
|
|
|
RUN apt install -y php${PHP_VERSION}-memcached php${PHP_VERSION}-memcached php${PHP_VERSION}-intl php${PHP_VERSION}-gd \
|
|
|
|
php${PHP_VERSION}-mysql php${PHP_VERSION}-ldap php${PHP_VERSION}-zip \
|
|
|
|
php${PHP_VERSION}-fpm php${PHP_VERSION}-mysql php${PHP_VERSION}-mbstring php${PHP_VERSION}-bz2 php-dompdf php${PHP_VERSION}-xml php${PHP_VERSION}-redis \
|
2023-11-20 21:52:04 +01:00
|
|
|
curl
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
|
|
|
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
|
|
|
|
php composer-setup.php && \
|
|
|
|
php -r "unlink('composer-setup.php');"
|
|
|
|
|
|
|
|
RUN mv composer.phar /usr/local/bin/composer
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-05-04 20:06:34 +02:00
|
|
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
|
|
|
|
2023-04-13 21:44:55 +02:00
|
|
|
RUN apt install -y \
|
|
|
|
apache2 apache2-utils libapache2-mod-php${PHP_VERSION}
|
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
COPY ./envvars /etc/apache2/envvars
|
|
|
|
|
|
|
|
RUN chmod -R 777 /etc/ssl/private
|
|
|
|
|
2023-07-01 16:08:25 +02:00
|
|
|
RUN a2enmod rewrite alias authz_user ssl
|
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} \
|
2023-11-20 21:52:04 +01:00
|
|
|
--shell /bin/bash \
|
|
|
|
#--shell /usr/sbin/nologin \
|
2023-04-11 21:48:35 +02:00
|
|
|
--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
|
|
|
|
|
2023-10-27 17:06:20 +02:00
|
|
|
RUN update-alternatives --install /usr/bin/php php /usr/bin/php${PHP_VERSION} 99 --force
|
|
|
|
RUN update-alternatives --set php /usr/bin/php${PHP_VERSION}
|
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
RUN apt install -y vim git && \
|
|
|
|
apt autoremove && apt clean
|
|
|
|
|
2023-04-11 21:48:35 +02:00
|
|
|
USER tikiwiki
|
|
|
|
|
|
|
|
RUN git clone -b ${BRANCH} https://gitlab.com/tikiwiki/tiki.git .
|
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
# Fix LDAP.php
|
|
|
|
ADD patch/ldap.php lib/auth/ldap.php
|
|
|
|
|
|
|
|
RUN rm -rf .git
|
|
|
|
|
2023-10-27 17:06:20 +02:00
|
|
|
# Solucion temporal ( para 26.x )
|
2023-11-20 21:52:04 +01:00
|
|
|
|
|
|
|
#COPY packages/* vendor_custom/
|
|
|
|
|
|
|
|
#RUN chmod -R 777 vendor_custom
|
|
|
|
|
|
|
|
#RUN cd vendor_custom && \
|
|
|
|
# find . -name "*.zip" | while read filename; do unzip $filename; done;
|
|
|
|
#RUN cd vendor_custom && rm -rf *.zip
|
2023-10-27 17:06:20 +02:00
|
|
|
|
|
|
|
RUN sh setup.sh -n composer
|
2023-04-13 21:44:55 +02:00
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
#ADD composer.json composer.json
|
|
|
|
#RUN composer --prefer-dist update
|
2023-05-04 20:06:34 +02:00
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
ADD entrypoint.sh /entrypoint.sh
|
2023-04-11 21:48:35 +02:00
|
|
|
|
|
|
|
RUN mkdir -p files/forums && chmod -R 777 files/forums
|
2023-04-10 21:59:09 +02:00
|
|
|
|
2023-11-20 21:52:04 +01:00
|
|
|
RUN mkdir -p /tmp/run/apache2 && \
|
|
|
|
mkdir -p /tmp/lock/apache2 && \
|
|
|
|
mkdir -p /tmp/log/apache2
|
|
|
|
|
|
|
|
#USER root
|
2023-04-13 21:44:55 +02:00
|
|
|
ADD start.sh /start.sh
|
|
|
|
|
2023-04-10 21:59:09 +02:00
|
|
|
VOLUME ["/uploads"]
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
|
|
|
|
|
|
|
|
CMD "/start.sh"
|