Skip to content

Commit 0070886

Browse files
KingPinKingPin
authored andcommitted
fix: address PR review feedback
- Remove unreachable case 3) SLEEP_TIME=20 branches in retry loops (guarded by ATTEMPT -lt 3, so ATTEMPT=3 never reaches the case) - Clarify README: appuser is pre-created in v2 but entrypoint runs as root for s6-overlay; users should use --user 1000:1000
1 parent b54e1ad commit 0070886

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

Dockerfile.v1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ RUN for ATTEMPT in 1 2 3; do \
2828
case $ATTEMPT in \
2929
1) SLEEP_TIME=5 ;; \
3030
2) SLEEP_TIME=10 ;; \
31-
3) SLEEP_TIME=20 ;; \
3231
esac; \
3332
echo "Download attempt $ATTEMPT failed, retrying in ${SLEEP_TIME}s..."; \
3433
sleep $SLEEP_TIME; \
@@ -49,7 +48,6 @@ RUN for ATTEMPT in 1 2 3; do \
4948
case $ATTEMPT in \
5049
1) SLEEP_TIME=5 ;; \
5150
2) SLEEP_TIME=10 ;; \
52-
3) SLEEP_TIME=20 ;; \
5351
esac; \
5452
echo "Extension installation attempt $ATTEMPT failed, retrying in ${SLEEP_TIME}s..."; \
5553
sleep $SLEEP_TIME; \

Dockerfile.v2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ RUN if [ "$BASEOS" = "trixie" ] || [ "$BASEOS" = "bookworm" ]; then \
138138
case $ATTEMPT in \
139139
1) SLEEP_TIME=5 ;; \
140140
2) SLEEP_TIME=10 ;; \
141-
3) SLEEP_TIME=20 ;; \
142141
esac; \
143142
echo "Download attempt $ATTEMPT failed, retrying in ${SLEEP_TIME}s..."; \
144143
sleep $SLEEP_TIME; \
@@ -183,7 +182,6 @@ RUN if [ "$BASEOS" = "trixie" ] || [ "$BASEOS" = "bookworm" ]; then \
183182
case $ATTEMPT in \
184183
1) SLEEP_TIME=5 ;; \
185184
2) SLEEP_TIME=10 ;; \
186-
3) SLEEP_TIME=20 ;; \
187185
esac; \
188186
echo "Download attempt $ATTEMPT failed, retrying in ${SLEEP_TIME}s..."; \
189187
sleep $SLEEP_TIME; \

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,12 @@ We maintain **two image variants** to support both existing users and modern use
156156
✅ Proper PID 1 and process supervision (s6)
157157
✅ Safe for running FPM + sidecar processes (e.g., cron, queue workers)
158158
✅ Environment-based PHP config at runtime
159-
Non-root user (appuser, UID 1000) by default
159+
Includes non-root user (`appuser`, UID 1000) for running your application
160160
✅ Easier to add background services and health checks
161161
✅ Handles container signals properly
162162

163+
> The container entrypoint runs as root (required for s6-overlay as PID 1), but a non-root `appuser` is pre-created. To run your app as this user, use `--user 1000:1000` or configure your orchestrator's security context.
164+
163165
**Cons:**
164166

165167
❌ Slightly larger image due to s6-overlay (~2-3MB)
@@ -208,7 +210,7 @@ For more details, see [docs/ci.md](docs/ci.md).
208210

209211
These images are designed with security in mind:
210212

211-
- **Non-root User (v2)**: v2 containers include a non-root `appuser` (UID 1000). v1 images run as the base PHP image default (root)
213+
- **Non-root User (v2)**: v2 images include a pre-created `appuser` (UID 1000) for running your application. The entrypoint runs as root for s6-overlay, but your app can run as appuser via `--user 1000:1000`. v1 images run as the base PHP image default (root)
212214
- **Limited Permissions (v2)**: `/var/www/html` directory has appropriate ownership and permissions
213215
- **Security Updates**: Images are regularly scanned for vulnerabilities via Trivy
214216

0 commit comments

Comments
 (0)