Skip to content

Commit 0004cc7

Browse files
committed
Add xDebug install and Nextcloud init to Dockerfile.
1 parent 1637e63 commit 0004cc7

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Dockerfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
ARG NEXTCLOUD_VERSION
2+
ARG XDEBUG_VERSION
3+
24
FROM nextcloud:${NEXTCLOUD_VERSION}
35

46
RUN apt-get update && apt-get install --no-install-recommends -yq \
57
git \
68
sudo \
79
vim \
810
zip \
11+
${PHPIZE_DEPS} \
912
&& rm -rf /var/lib/apt/lists/* \
1013
&& a2enmod ssl \
1114
&& mkdir /tls \
@@ -15,13 +18,24 @@ RUN apt-get update && apt-get install --no-install-recommends -yq \
1518
-subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
1619

1720
COPY solid/ /usr/src/nextcloud/apps/solid
21+
COPY docker/xdebug.sh /xdebug.sh
1822
COPY init.sh /
1923
COPY init-live.sh /
2024
COPY site.conf /etc/apache2/sites-enabled/000-default.conf
2125

2226
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
23-
RUN composer install --working-dir=/usr/src/nextcloud/apps/solid --no-dev --prefer-dist \
24-
&& rm /usr/local/bin/composer
27+
28+
RUN composer install --working-dir=/usr/src/nextcloud/apps/solid --prefer-dist \
29+
&& sh /xdebug.sh \
30+
&& pecl install "xdebug-$(cat /xdebug.version)" \
31+
&& docker-php-ext-enable xdebug \
32+
&& NEXTCLOUD_ADMIN_PASSWORD='alice123' \
33+
NEXTCLOUD_ADMIN_USER='alice' \
34+
NEXTCLOUD_TRUSTED_DOMAINS='localhost server thirdparty nextcloud.local *.nextcloud.local' \
35+
NEXTCLOUD_UPDATE=1 \
36+
/entrypoint.sh 'echo' \
37+
&& php /var/www/html/console.php maintenance:install --admin-user='alice' --admin-pass='alice123' \
38+
&& php /var/www/html/console.php app:enable solid
2539

2640
WORKDIR /var/www/html
2741
EXPOSE 443

0 commit comments

Comments
 (0)