2
0
Эх сурвалжийг харах

Merge pull request #520 from shochdoerfer/fix/docker_permissons

Mark Shust 3 жил өмнө
parent
commit
007fc706c2

+ 4 - 2
images/php/7.3/Dockerfile

@@ -1,6 +1,8 @@
 FROM php:7.3-fpm-buster
 MAINTAINER Mark Shust <mark@shust.com>
 
+ARG APP_ID=1000
+
 RUN apt-get update && apt-get install -y \
   cron \
   git \
@@ -69,8 +71,8 @@ RUN pecl install ssh2-1.2 \
 RUN pecl install redis \
   && docker-php-ext-enable redis
 
-RUN groupadd -g 1000 app \
- && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
+RUN groupadd -g "$APP_ID" app \
+  && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
 
 RUN apt-get install -y gnupg \
   && curl -sL https://deb.nodesource.com/setup_14.x | bash - \

+ 4 - 2
images/php/7.4/Dockerfile

@@ -1,6 +1,8 @@
 FROM php:7.4-fpm-buster
 MAINTAINER Mark Shust <mark@shust.com>
 
+ARG APP_ID=1000
+
 RUN apt-get update && apt-get install -y \
   cron \
   git \
@@ -69,8 +71,8 @@ RUN pecl install ssh2-1.2 \
 RUN pecl install redis \
   && docker-php-ext-enable redis
 
-RUN groupadd -g 1000 app \
- && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
+RUN groupadd -g "$APP_ID" app \
+  && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
 
 RUN apt-get install -y gnupg \
   && curl -sL https://deb.nodesource.com/setup_14.x | bash - \

+ 4 - 2
images/php/8.0/Dockerfile

@@ -1,6 +1,8 @@
 FROM php:8.0-fpm-buster
 MAINTAINER Mark Shust <mark@shust.com>
 
+ARG APP_ID=1000
+
 RUN apt-get update && apt-get install -y \
   cron \
   default-mysql-client \
@@ -52,8 +54,8 @@ RUN pecl channel-update pecl.php.net \
 RUN pecl install redis \
   && docker-php-ext-enable redis
 
-RUN groupadd -g 1000 app \
- && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
+RUN groupadd -g "$APP_ID" app \
+  && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
 
 RUN apt-get install -y gnupg \
   && curl -sL https://deb.nodesource.com/setup_14.x | bash - \