You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**ARM64/Apple Silicon support is needed** - The Debian variant has native multi-arch support
23
22
-**Compatibility issues with Alpine** - Some PHP extensions or native libraries may have issues with musl libc
24
23
-**Debugging needs** - Debian includes more debugging tools out of the box
25
24
-**Familiarity** - Teams more familiar with Debian/Ubuntu environments
25
+
-**Native library compatibility** - Some C libraries behave differently with glibc vs musl
26
26
27
27
## When to Use Alpine
28
28
29
29
Choose the Alpine variant when:
30
30
31
31
-**Minimal image size is critical** - Alpine images are significantly smaller
32
32
-**Security through minimalism** - Smaller attack surface with fewer packages
33
-
-**amd64-only deployments** - No need for ARM64 support
33
+
-**musl libc is acceptable** - Your application has no compatibility issues with musl
34
+
35
+
**Note:** Both Alpine and Debian variants now support multi-arch (amd64 + arm64).
34
36
35
37
## Key Differences in Detail
36
38
37
39
### 1. Supervisord Implementation
38
40
39
-
**Alpine**uses [ochinchina/supervisord](https://github.com/ochinchina/supervisord), a Go-based reimplementation:
41
+
Both **Alpine**and **Debian** now use the official Python-based supervisord package (installed via `apk add supervisor` and `apt-get install supervisor` respectively). The configuration format is identical:
40
42
41
43
```ini
42
-
# Alpine supervisor.conf
43
-
[program:nginx]
44
-
depends_on = php-fpm
45
-
command = nginx -g "daemon off;"
46
-
stopasgroup = true
47
-
stderr_logfile = /dev/stderr
48
-
stdout_logfile = /dev/stdout
44
+
# supervisor.conf (both Alpine and Debian)
45
+
[supervisord]
46
+
logfile=/dev/stdout
47
+
logfile_maxbytes=0
48
+
pidfile=/run/supervisord.pid
49
+
nodaemon=true
49
50
50
51
[program:php-fpm]
51
52
command = php-fpm
53
+
priority = 10
54
+
autorestart = true
52
55
stopasgroup = true
56
+
killasgroup = true
53
57
stderr_logfile = /dev/stderr
54
58
stdout_logfile = /dev/stdout
55
-
```
56
-
57
-
**Debian** uses the official Python-based supervisord package:
58
-
59
-
```ini
60
-
# Debian supervisor.conf
61
-
[supervisord]
62
-
nodaemon=true
63
-
user=root
64
-
logfile=/dev/null
65
-
logfile_maxbytes=0
66
-
pidfile=/run/supervisord.pid
67
-
68
-
[program:php-fpm]
69
-
command=php-fpm
70
-
priority=10
71
-
autostart=true
72
-
autorestart=true
73
-
stopasgroup=true
74
-
killasgroup=true
75
-
stdout_logfile=/dev/stdout
76
-
stdout_logfile_maxbytes=0
77
-
stderr_logfile=/dev/stderr
78
-
stderr_logfile_maxbytes=0
59
+
stderr_logfile_maxbytes = 0
60
+
stdout_logfile_maxbytes = 0
79
61
80
62
[program:nginx]
81
-
command=nginx -g "daemon off;"
82
-
priority=20
83
-
autostart=true
84
-
autorestart=true
85
-
stopasgroup=true
86
-
killasgroup=true
87
-
stdout_logfile=/dev/stdout
88
-
stdout_logfile_maxbytes=0
89
-
stderr_logfile=/dev/stderr
90
-
stderr_logfile_maxbytes=0
63
+
command = nginx -g "daemon off;"
64
+
priority = 20
65
+
autorestart = true
66
+
stopasgroup = true
67
+
killasgroup = true
68
+
stderr_logfile = /dev/stderr
69
+
stdout_logfile = /dev/stdout
70
+
stderr_logfile_maxbytes = 0
71
+
stdout_logfile_maxbytes = 0
91
72
```
92
73
93
-
**Key differences:**
94
-
- Alpine uses `depends_on` for process ordering
95
-
- Debian uses `priority` (lower number starts first)
96
-
- Debian requires a `[supervisord]` section with `nodaemon=true`
97
-
- Debian needs `stdout_logfile_maxbytes=0` to disable log rotation for stdout/stderr
74
+
**Key configuration points:**
75
+
-`priority` controls startup order (lower number starts first)
76
+
-`nodaemon=true` keeps supervisord in foreground
77
+
-`stdout_logfile_maxbytes=0` disables log rotation for stdout/stderr
98
78
99
79
### 2. Entrypoint Script
100
80
@@ -155,11 +135,14 @@ To migrate from Alpine to Debian:
155
135
image: kooldev/php:8.4-debian-nginx
156
136
```
157
137
158
-
2. **Custom supervisor configs:** If you've customized the supervisor configuration, update to use `priority` instead of `depends_on`
138
+
2. **Shell scripts:** Update any scripts that use:
139
+
- `su-exec` → `gosu`
140
+
- BusyBox-specific commands → standard GNU coreutils
141
+
- `sh`shebang → `bash` shebang (if using bash features)
159
142
160
-
3. **Shell scripts:** Update any scripts that rely on Alpine-specific paths or BusyBox commands
143
+
3. **Test thoroughly:** The glibc vs musl difference can cause subtle behavior changes in some applications
161
144
162
-
4. **Test thoroughly:** The glibc vs musl difference can cause subtle behavior changes in some applications
145
+
**Note:** Supervisor configuration format is now identical between Alpine and Debian, so no changes needed for custom supervisor configs.
0 commit comments