FROM httpd
RUN apt update && apt -y upgrade && apt install -y git \
openssl \
php7.3 \
php7.3-fpm \
php7.3-cli \
php7.3-curl \
php7.3-exif \
php7.3-gd \
php7.3-intl \
php7.3-json \
php7.3-mbstring \
php7.3-mysql \
php7.3-gmp \
php7.3-bcmath \
php7.3-opcache \
php7.3-readline \
php7.3-xml \
php7.3-ds \
php7.3-mailparse \
#libapache2-mod-php \
sendmail \
gettext \
locales && apt clean
RUN sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG es_ES.UTF-8
ENV LANGUAGE es_ES:es
ENV LC_ALL es_ES.UTF-8
RUN git clone --depth=1 https://gitea.hatthieves.es/cloud/gnu-social /gnusocial
RUN git clone --depth=1 https://github.com/cweiske/xmpphp /xmpphp
RUN mkdir -p /gnusocial/plugins/Xmpp/extlib \
&& mv /xmpphp/XMPPHP /gnusocial/plugins/Xmpp/extlib \
&& sed -i "s/require_once 'XMPPHP\//require_once '/" /gnusocial/plugins/Xmpp/extlib/XMPPHP/* \
&& rm -rf /xmpphp 
WORKDIR /gnusocial
#RUN make && chown www-data.www-data -R /gnusocial \
RUN chown www-data.www-data -R /gnusocial \
&& rm -rf /usr/local/apache2/htdocs/ \
&& ln -sf /gnusocial /usr/local/apache2/htdocs
