Skip to content

Commit 63fc1fd

Browse files
esfahanwebbestlong
authored andcommitted
Update Dockerfile (laradock#2162)
the first time, I ran apache2 container with other things such as MariaDB & PHPMyAdmin the second time, I decided to run nginx instead of apache2 and I faced an error that said "adduser: group 'www-data' in use", so I solved and shared it to others.
1 parent 623ff66 commit 63fc1fd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

nginx/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ RUN apk update \
1818
&& apk add --no-cache openssl \
1919
&& apk add --no-cache bash
2020

21+
RUN set -x ; \
22+
addgroup -g 82 -S www-data ; \
23+
adduser -u 82 -D -S -G www-data www-data && exit 0 ; exit 1
24+
2125
ARG PHP_UPSTREAM_CONTAINER=php-fpm
2226
ARG PHP_UPSTREAM_PORT=9000
2327

0 commit comments

Comments
 (0)