Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfe823eb

Browse files
committed
Removes user creation and group assignment from root dockerfiles
1 parent30ae531 commitfe823eb

File tree

4 files changed

+4
-44
lines changed

4 files changed

+4
-44
lines changed

‎docker-compose.root.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ services:
5858
-laravel
5959

6060
composer:
61-
build:
62-
context:./dockerfiles
63-
dockerfile:composer.root.dockerfile
61+
image:composer:2
6462
container_name:composer
6563
volumes:
6664
-./src:/var/www/html

‎dockerfiles/composer.root.dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎dockerfiles/nginx.root.dockerfile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
FROM nginx:stable-alpine
22

3-
ARG UID
4-
ARG GID
5-
6-
ENV UID=${UID}
7-
ENV GID=${GID}
8-
9-
# MacOS staff group's gid is 20, so is the dialout group in alpine linux. We're not using it, let's just remove it.
10-
RUN delgroup dialout
11-
12-
RUN addgroup -g ${GID} --system laravel
13-
RUN adduser -G laravel --system -D -s /bin/sh -u ${UID} laravel
14-
RUN sed -i"s/user nginx/user laravel/g" /etc/nginx/nginx.conf
3+
RUN sed -i"s/user nginx/user root/g" /etc/nginx/nginx.conf
154

165
ADD ./nginx/default.conf /etc/nginx/conf.d/
176

‎dockerfiles/php.root.dockerfile

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
FROM php:8-fpm-alpine
22

3-
ARG UID
4-
ARG GID
5-
6-
ENV UID=${UID}
7-
ENV GID=${GID}
8-
93
RUN mkdir -p /var/www/html
104

115
WORKDIR /var/www/html
126

13-
# MacOS staff group's gid is 20, so is the dialout group in alpine linux. We're not using it, let's just remove it.
14-
RUN delgroup dialout
15-
16-
RUN addgroup -g ${GID} --system laravel
17-
RUN adduser -G laravel --system -D -s /bin/sh -u ${UID} laravel
18-
19-
RUN sed -i"s/user = www-data/user = laravel/g" /usr/local/etc/php-fpm.d/www.conf
20-
RUN sed -i"s/group = www-data/group = laravel/g" /usr/local/etc/php-fpm.d/www.conf
7+
RUN sed -i"s/user = www-data/user = root/g" /usr/local/etc/php-fpm.d/www.conf
8+
RUN sed -i"s/group = www-data/group = root/g" /usr/local/etc/php-fpm.d/www.conf
219
RUN echo"php_admin_flag[log_errors] = on" >> /usr/local/etc/php-fpm.d/www.conf
2210

2311
RUN docker-php-ext-install pdo pdo_mysql

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp