diff --git a/README.md b/README.md index 8203214..ab9d571 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,11 @@ with [FrankenPHP](https://frankenphp.dev) and [Caddy](https://caddyserver.com/) 4. [Deploying in production](docs/production.md) 5. [Debugging with Xdebug](docs/xdebug.md) 6. [TLS Certificates](docs/tls.md) -7. [Using a Makefile](docs/makefile.md) -8. [Using MySQL instead of PostgreSQL](docs/mysql.md) -9. [Troubleshooting](docs/troubleshooting.md) +7. [Using MySQL instead of PostgreSQL](docs/mysql.md) +8. [Using Alpine Linux instead of Debian](docs/alpine.md) +9. [Using a Makefile](docs/makefile.md) 10. [Updating the template](docs/updating.md) +11. [Troubleshooting](docs/troubleshooting.md) ## License diff --git a/docs/alpine.md b/docs/alpine.md new file mode 100644 index 0000000..49f180b --- /dev/null +++ b/docs/alpine.md @@ -0,0 +1,29 @@ +# Using Alpine Linux Instead of Debian + +By default, Symfony Docker uses Debian-based FrankenPHP Docker images. +This is the recommended solution. + +Alternatively, it's possible to use Alpine-based images, which are smaller but +are known to be slower, and have several known issues. + +To switch to Alpine-based images, apply the following changes to the `Dockerfile`: + +```patch +-FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream ++FROM dunglas/frankenphp:1-alpine-php8.3 AS frankenphp_upstream + +-# hadolint ignore=DL3008 +-RUN apt-get update && apt-get install -y --no-install-recommends \ +- acl \ +- file \ +- gettext \ +- git \ +- && rm -rf /var/lib/apt/lists/* ++# hadolint ignore=DL3018 ++RUN apk add --no-cache \ ++ acl \ ++ file \ ++ gettext \ ++ git \ ++ ; +```