Skip to content

Commit ae243cd

Browse files
authored
Merge pull request #946 from nextcloud/feat/custom-user-32bits
chore: use non-root user for PHP 32bits image
2 parents 0cac4c4 + adff377 commit ae243cd

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

php8.4-32bit/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ RUN apt-get update && apt-get install -y wget apt-transport-https lsb-release ca
1111
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
1212

1313
RUN phpenmod zip intl gd systemd
14+
RUN phpdismod xdebug
15+
1416
RUN curl -O -L https://getcomposer.org/download/2.9.2/composer.phar \
15-
&& chmod +x composer.phar \
16-
&& mv composer.phar /usr/local/bin/composer
17+
&& chmod +x composer.phar \
18+
&& mv composer.phar /usr/local/bin/composer
19+
20+
# Don't use root
21+
RUN groupadd -g 1001 runner &&useradd -m -u 1001 -g runner runner
22+
USER runner
1723

18-
RUN phpdismod xdebug
1924
ADD nextcloud.ini /etc/php/8.4/cli/conf.d/nextcloud.ini

0 commit comments

Comments
 (0)