0
submitted 2 months ago* (last edited 2 months ago) by sanitation@lemmy.today to c/php@programming.dev

Not op. Just reposting

I published this guide today, which explains some of the best practices for building production-ready Docker images for your PHP applications which use Composer to install dependencies.

This includes using Composer without leaving the binary in your production image, running the composer install command with the correct flags, excluding your local vendor directory from the build context, optimizing cache to speed up consecutive builds, optimizing the Composer autoloader, and passing authentication credentials to Composer to install packages from private registries.

https://nth-root.nl/en/guides/composer-in-docker-best-practices-for-production-images

no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 30 Jun 2026
0 points (50.0% liked)

PHP

816 readers
1 users here now

Welcome to /c/php! This is a community for PHP developers and enthusiasts to share and discuss anything related to PHP. From the latest updates and tutorials, to your burning questions and amazing personal projects, we welcome all contributions.

Let's foster an environment of respect, learning, and mutual growth. Whether you're an experienced PHP developer, a beginner, or just interested in learning more about PHP, we're glad to have you here!

Let's code, learn, and grow together!

founded 3 years ago
MODERATORS