Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Dockerfile Laravel

Dockerfile Laravel Laravel Package

fly-apps/dockerfile-laravel

Fly.io's Dockerfile for Laravel gives Laravel applications a production-ready container setup with sensible defaults for PHP, Composer, frontend assets, and deployment. Simplify Docker builds, reduce configuration, and ship to Fly.io faster with a reliable, out-of-the-box Dockerfile.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Dockerfile Laravel
What is fly-apps/dockerfile-laravel used for?
It is Fly.io's production-ready Dockerfile template for Laravel applications. It provides sensible defaults for PHP, Composer, frontend assets, and container deployment so teams can build and ship Laravel apps with less Docker configuration. It is deployment tooling, not an application-level Composer dependency.
Is fly-apps/dockerfile-laravel a Composer package I install with composer require?
No. It is a Dockerfile/image template for Laravel deployment rather than a library you require inside your application. You use it by adopting or copying the Dockerfile conventions from the repository into your project. Composer is used in the image build for Laravel dependencies, but the package itself is not installed into your app's vendor directory.
Which Laravel and PHP versions does this Dockerfile support?
Exact Laravel and PHP version support depends on the base image and Dockerfile configuration you choose. You should validate it against your project's PHP version, base OS variant, and required PHP extensions. Release 1.0.9 adds PHAR support but does not document framework-level version constraints.
How do I use fly-apps/dockerfile-laravel in an existing Laravel project?
Adopt the Dockerfile as a template in your repository, compare it with your current container setup, and pin the version you intend to use. Rebuild the image in CI and run your normal Laravel tests plus container smoke tests. Avoid floating tags in production so deployments remain reproducible.
What changed in fly-apps/dockerfile-laravel 1.0.9?
Version 1.0.9 adds PHAR support to the generated Dockerfile and image. This fits teams that package or consume PHP Archive-based tooling, CLIs, or artifacts during build or runtime. The release is described as a patch-level image-template change with no documented breaking changes.
Do I need PHAR support for a normal Laravel application?
Not necessarily. Many Laravel applications may not require the PHAR extension unless build scripts, deployment tooling, or runtime CLIs depend on PHAR archives. Confirm whether your Composer workflow or tooling actually needs it before adopting the change. If it is not needed, you can defer upgrading until your next routine image refresh.
Could enabling PHAR increase Docker image size or build time?
It may have a minor impact on image size or build-cache behavior, especially if the extension is added explicitly. If your selected PHP base image already includes PHAR, the configuration could be redundant. Validate image size, build duration, and vulnerability scan results in CI before promoting the image.
How should I test the Dockerfile upgrade before deploying to production?
Compare the generated Dockerfile against your current baseline, pin version 1.0.9, and rebuild the image in CI. Run your Laravel test suite, container smoke tests, image vulnerability checks, and size checks. Deploy to staging first and keep the previous Dockerfile tag available for rollback.
Can I roll back to 1.0.8 if the new Dockerfile causes problems?
Yes. Rollback should be straightforward by reverting to the previous Dockerfile tag or pinned version, such as 1.0.8, and rebuilding the image. Keep the prior Dockerfile available in version control or your deployment configuration. This makes the upgrade an isolated image-layer change rather than a framework migration.
Is fly-apps/dockerfile-laravel a good alternative to Laravel Sail or a handwritten Dockerfile?
It is a good fit when you want production-oriented Laravel container defaults, especially for Fly.io or similar container platforms. Laravel Sail is primarily a local development environment, while a handwritten Dockerfile gives more control but requires more maintenance. Evaluate it against your deployment pipeline, PHP extension needs, and image hardening requirements.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect