Skip to content

Commit 577658e

Browse files
committed
Add xDebug install and Nextcloud init to Dockerfile.
1 parent fcbe414 commit 577658e

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

Dockerfile

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

4-
RUN apt-get update && apt-get install --no-install-recommends -yq \
6+
SHELL ["/bin/bash", "-c"]
7+
8+
RUN apt-get update \
9+
&& read -ra PHPIZE_DEPS <<< "${PHPIZE_DEPS}" \
10+
&& apt-get install --no-install-recommends -yq \
511
git \
612
sudo \
713
vim \
814
zip \
15+
"${PHPIZE_DEPS[@]}" \
916
&& rm -rf /var/lib/apt/lists/* \
1017
&& a2enmod ssl \
1118
&& mkdir /tls \
@@ -15,13 +22,24 @@ RUN apt-get update && apt-get install --no-install-recommends -yq \
1522
-subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
1623

1724
COPY solid/ /usr/src/nextcloud/apps/solid
25+
COPY docker/xdebug.sh /xdebug.sh
1826
COPY init.sh /
1927
COPY init-live.sh /
2028
COPY site.conf /etc/apache2/sites-enabled/000-default.conf
2129

2230
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
31+
32+
RUN composer install --working-dir=/usr/src/nextcloud/apps/solid --prefer-dist \
33+
&& sh /xdebug.sh \
34+
&& pecl install "xdebug-$(cat /xdebug.version)" \
35+
&& docker-php-ext-enable xdebug \
36+
&& NEXTCLOUD_ADMIN_PASSWORD='alice123' \
37+
NEXTCLOUD_ADMIN_USER='alice' \
38+
NEXTCLOUD_TRUSTED_DOMAINS='localhost server thirdparty nextcloud.local *.nextcloud.local' \
39+
NEXTCLOUD_UPDATE=1 \
40+
/entrypoint.sh 'echo' \
41+
&& php /var/www/html/console.php maintenance:install --admin-user='alice' --admin-pass='alice123' \
42+
&& php /var/www/html/console.php app:enable solid
2543

2644
WORKDIR /var/www/html
2745
EXPOSE 443

0 commit comments

Comments
 (0)