FROM nextcloud:fpm-alpine

RUN set -ex; \
 apk add --no-cache --virtual .build-deps \
	autoconf \
	automake \
	file \
	g++ \
	gcc \
	make \
	php7-dev \
	re2c \
	samba-dev \
	zlib-dev; \
 apk add --no-cache libsmbclient; \	
 pecl install smbclient; \
 docker-php-ext-enable smbclient; \ 
 apk add --no-cache imagemagick; \ 
 apk add --no-cache sudo; \
 apk del .build-deps

COPY redis.config.php /usr/src/nextcloud/config/redis.config.php

# temporary. remove cypress files for code integrity.
RUN set -x; \
    rm -rf /var/www/html/apps/cypress; \
    rm /var/www/html/apps/cypress.json