Skip to content

Commit b17829b

Browse files
authored
Ensure file permissions (#171)
1 parent a65867e commit b17829b

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

FrankenPHP.Alpine.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ RUN mkdir -p \
179179
storage/framework/cache \
180180
storage/framework/testing \
181181
storage/logs \
182-
bootstrap/cache && chmod -R a+rw storage
182+
bootstrap/cache \
183+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
184+
&& chmod -R a+rw ${ROOT}
183185

184186
RUN composer dump-autoload \
185187
--optimize \

FrankenPHP.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ COPY --link --chown=${USER_ID}:${GROUP_ID} --from=build ${ROOT}/public public
179179
RUN mkdir -p \
180180
storage/framework/{sessions,views,cache,testing} \
181181
storage/logs \
182-
bootstrap/cache && chmod -R a+rw storage
182+
bootstrap/cache \
183+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
184+
&& chmod -R a+rw ${ROOT}
183185

184186
RUN composer dump-autoload \
185187
--optimize \

RoadRunner.Alpine.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ RUN mkdir -p \
163163
storage/framework/cache \
164164
storage/framework/testing \
165165
storage/logs \
166-
bootstrap/cache && chmod -R a+rw storage
166+
bootstrap/cache \
167+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
168+
&& chmod -R a+rw ${ROOT}
167169

168170
RUN composer dump-autoload \
169171
--optimize \

RoadRunner.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ COPY --link --chown=${USER_ID}:${GROUP_ID} --from=build ${ROOT}/public public
161161
RUN mkdir -p \
162162
storage/framework/{sessions,views,cache,testing} \
163163
storage/logs \
164-
bootstrap/cache && chmod -R a+rw storage
164+
bootstrap/cache \
165+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
166+
&& chmod -R a+rw ${ROOT}
165167

166168
RUN composer dump-autoload \
167169
--optimize \

Swoole.Alpine.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ RUN mkdir -p \
163163
storage/framework/cache \
164164
storage/framework/testing \
165165
storage/logs \
166-
bootstrap/cache && chmod -R a+rw storage
166+
bootstrap/cache \
167+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
168+
&& chmod -R a+rw ${ROOT}
167169

168170
RUN composer dump-autoload \
169171
--optimize \

Swoole.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ COPY --link --chown=${USER_ID}:${GROUP_ID} --from=build ${ROOT}/public public
161161
RUN mkdir -p \
162162
storage/framework/{sessions,views,cache,testing} \
163163
storage/logs \
164-
bootstrap/cache && chmod -R a+rw storage
164+
bootstrap/cache \
165+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
166+
&& chmod -R a+rw ${ROOT}
165167

166168
RUN composer dump-autoload \
167169
--optimize \

static-build.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ COPY --link --chown=${USER_ID}:${GROUP_ID} --from=build ${ROOT}/public public
179179
RUN mkdir -p \
180180
storage/framework/{sessions,views,cache,testing} \
181181
storage/logs \
182-
bootstrap/cache && chmod -R a+rw storage
182+
bootstrap/cache \
183+
&& chown -R ${USER_ID}:${GROUP_ID} ${ROOT} \
184+
&& chmod -R a+rw ${ROOT}
183185

184186
RUN composer dump-autoload \
185187
--optimize \

0 commit comments

Comments
 (0)