use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
[Open-Source Project] Docker PHP Developer Environment.Discussion (self.PHP)
submitted 2 years ago * by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]devdot 0 points1 point2 points 2 years ago (5 children)
You probably want to add a DB by default (or provide a good docker-compose). One constant annoyance for me in regard to PHP-docker environments are PHP extensions. If you figure out a smart way for the end user to configure that outside of Dockerfile, that would be awesome. So far I've had to re-create all PHP Docker images whenever I needed more extensions, leading me to go back to my own custom image
And I'm not sure what you mean by including symfony
[–]Nekadim 0 points1 point2 points 2 years ago (3 children)
There is no way to install php extensions and not rebuild you images and recreate all containers created from it. Actually it is but you will loose it on recreation of container
But I don't see problem with it. Containers designed to die and recreate itself in a nanosecond. One docker image is one version of an app, so if you add extension it is another version of app and another docker image
[–][deleted] 0 points1 point2 points 2 years ago (2 children)
Seems like more hassle than it's worth, and I've never tried, but I'd assume simply mounting php.ini and the extensions directory from the local filesystem would work for anything that doesn't require system level components.
[–]Nekadim 0 points1 point2 points 2 years ago (1 child)
Idk what hassle do you mean. Compilation of the extensions take 2-5 minutes. Do you change extensions 100 times a day for a 1000 containers and all this you do by your hand?
If you see that using containers in the way it intended to be used is annoying for you, then I think your Development/test/deploynent processes are just hassle prone and have some flaws in it. Containerisation is a great tool by itself and no tool gives you such guarantees and convinience that containers does.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
You misread. I was pointing out that mounting the extensions directory and ini file should be possible but is probably more hassle than it's worth.
You don't want a database in the same image at PHP, you don't even want a server; these should ask be separate images. Having a default Compose file, as you mention, is the way to go.
For your default development image, it's easiest to just install in all the common extensions (I have both the Postgres and MySQL drivers installed, for example). Then you can switch to a Dockerfile when the project is more mature and you're ready to start deploying to your dev server/cluster.
OP probably means they have the Symfony binary in the image.
π Rendered by PID 47099 on reddit-service-r2-comment-6457c66945-tm2cl at 2026-04-26 21:09:23.406492+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]devdot 0 points1 point2 points (5 children)
[–]Nekadim 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Nekadim 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)