89 lines
2.4 KiB
Docker
89 lines
2.4 KiB
Docker
FROM debian:stable-slim
|
|
|
|
ARG BRANCH=25.x
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
ARG PHP_VERSION=7.4
|
|
|
|
RUN apt update && apt dist-upgrade -y
|
|
|
|
## Install Diferent PHP version
|
|
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
|
|
|
|
## 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
|
|
|
|
RUN apt install -y imagemagick ffmpeg python3 \
|
|
mariadb-client unoconv
|
|
|
|
RUN apt remove -y php-cli && \
|
|
apt install -y php${PHP_VERSION}-cli
|
|
|
|
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 \
|
|
composer curl
|
|
|
|
|
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
|
|
|
RUN apt install -y \
|
|
apache2 apache2-utils libapache2-mod-php${PHP_VERSION}
|
|
|
|
RUN a2enmod rewrite alias authz_user ssl
|
|
|
|
RUN addgroup --gid ${GID} tikiwiki
|
|
|
|
RUN adduser \
|
|
--system \
|
|
--uid ${UID} \
|
|
--gid ${GID} \
|
|
--shell /usr/sbin/nologin \
|
|
--gecos 'Tikiwiki' \
|
|
--disabled-password \
|
|
--home /var/www/html/tiki \
|
|
tikiwiki
|
|
|
|
RUN adduser www-data tikiwiki
|
|
|
|
WORKDIR /var/www/html/tiki
|
|
|
|
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}
|
|
|
|
USER tikiwiki
|
|
|
|
RUN git clone -b ${BRANCH} https://gitlab.com/tikiwiki/tiki.git .
|
|
|
|
# Solucion temporal ( para 26.x )
|
|
COPY packages/* vendor_custom/
|
|
RUN cd vendor_custom && \
|
|
find . -name "*.zip" | while read filename; do unzip $filename; done;
|
|
RUN cd vendor_custom && rm -rf *.zip
|
|
|
|
RUN sh setup.sh -n composer
|
|
|
|
ADD entrypoint.sh /entrypoint.sh
|
|
|
|
USER root
|
|
|
|
RUN mkdir -p files/forums && chmod -R 777 files/forums
|
|
|
|
ADD start.sh /start.sh
|
|
|
|
VOLUME ["/uploads"]
|
|
|
|
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
|
|
|
|
CMD "/start.sh"
|