40 lines
1.2 KiB
Docker
40 lines
1.2 KiB
Docker
FROM git.shihaam.dev/dockerfiles/php-fpm:8.3
|
|
|
|
ARG NEXTCLOUD_VERSION
|
|
ARG NEXTCLOUD_URL
|
|
ARG NEXTCLOUD_FILENAME
|
|
|
|
WORKDIR /var/www/html
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
# Installing basic tools
|
|
RUN apt-get update \
|
|
&& apt-get install {bzip2,zip,unzip,gnupg2,ca-certificates,lsb-release,apt-transport-https,wget,curl,nano} -y --no-install-recommends \
|
|
&& apt-get auto-remove -y \
|
|
&& apt-get clean -y
|
|
|
|
# Download, Extract and Delete nextcloud tar.bz2
|
|
RUN wget $NEXTCLOUD_URL \
|
|
&& tar -vxjf $NEXTCLOUD_FILENAME \
|
|
&& mv -v nextcloud/* . \
|
|
&& rm -rv nextcloud $NEXTCLOUD_FILENAME
|
|
|
|
# install php plugins
|
|
RUN docker-php-ext-install {gd,mysqli,pdo,pdo_mysql,bcmath,calendar,zip,gettext,exif,pcntl,shmop,-j$(nproc),gd,sysvmsg,sysvsem,sysvshm}
|
|
|
|
## copy default config and apps for setup in entrypoint
|
|
RUN mv /var/www/html/config/config.sample.php /var/www/default_config.sample.php \
|
|
&& mv /var/www/html/apps/ /var/www/default_apps/
|
|
|
|
# copy php config
|
|
COPY php.ini /usr/local/etc/php/php.ini
|
|
|
|
# copy and setup entrypoint
|
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
|
|
# export volume for nginx to serve static files
|
|
VOLUME /var/www/html
|
|
|
|
CMD ["php-fpm"]
|