Skip to content

Commit 4aed74b

Browse files
dunglasmaxhelias
authored andcommitted
docs: using Alpine Linux instead of Debian
1 parent 48bd564 commit 4aed74b

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ with [FrankenPHP](https://frankenphp.dev) and [Caddy](https://caddyserver.com/)
3636
4. [Deploying in production](docs/production.md)
3737
5. [Debugging with Xdebug](docs/xdebug.md)
3838
6. [TLS Certificates](docs/tls.md)
39-
7. [Using a Makefile](docs/makefile.md)
40-
8. [Using MySQL instead of PostgreSQL](docs/mysql.md)
41-
9. [Troubleshooting](docs/troubleshooting.md)
39+
7. [Using MySQL instead of PostgreSQL](docs/mysql.md)
40+
8. [Using Alpine Linux instead of Debian](docs/alpine.md)
41+
9. [Using a Makefile](docs/makefile.md)
4242
10. [Updating the template](docs/updating.md)
43+
11. [Troubleshooting](docs/troubleshooting.md)
4344

4445
## License
4546

docs/alpine.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Using Alpine Linux Instead of Debian
2+
3+
By default, Symfony Docker uses Debian-based FrankenPHP Docker images.
4+
This is the recommended solution.
5+
6+
Alternatively, it's possible to use Alpine-based images, which are smaller but
7+
are known to be slower, and have several known issues.
8+
9+
To switch to Alpine-based images, apply the following changes to the `Dockerfile`:
10+
11+
```patch
12+
-FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream
13+
+FROM dunglas/frankenphp:1-alpine-php8.3 AS frankenphp_upstream
14+
15+
-# hadolint ignore=DL3008
16+
-RUN apt-get update && apt-get install -y --no-install-recommends \
17+
- acl \
18+
- file \
19+
- gettext \
20+
- git \
21+
- && rm -rf /var/lib/apt/lists/*
22+
+# hadolint ignore=DL3018
23+
+RUN apk add --no-cache \
24+
+ acl \
25+
+ file \
26+
+ gettext \
27+
+ git \
28+
+ ;
29+
```

0 commit comments

Comments
 (0)