-
Notifications
You must be signed in to change notification settings - Fork 85
[WIP] Dockerize #38
base: development
Are you sure you want to change the base?
[WIP] Dockerize #38
Conversation
Nice! This one is a lot better than my approach. My experience was mostly dealing with Go or Java apps. Admittedly, dockerising php is not as easy as I've thought. This one helps us immensely. I've learnt a lot by reading your commits. My concern is only that the base images are based on debian, is it possible to shave size by switching into alpine linux? Not a very big deal, but I kinda leaning towards lightweight stuff. I think this is the way we should go, @mathewpeterson has done a better approach than mine. +1 for this one. What say you, @bepitulaz ? |
I think @mathewpeterson 's approach is better and also all the parameters have been moved to environment variables. I think we can go ahead by using this PR. Shall we merge it now or later? |
@lynxluna, @bepitulaz Good to hear that you like this approach. I can continue working on it. @lynxluna Regarding alpine images: I do not have an alpine image as there is always at least one project that runs debian/ubuntu in my data center. And with how Docker/AUFS handles the filesystem (copy on write) there is no increase in storage once you have the image local. My suggestion is that we use the current image and if there's enough support by it, we can work on getting an alpine image created. @bepitulaz There are some more things that I would need to add, e.g. documentation and maybe a Makefile in order to steamline things for new folks. There is also an assumption made with the configuration with regards to how the networking works: It expects some additional third party docker containers to be running in order to route the request via dns. I am not really sure how to solve this properly besides just using ports instead of dns. |
@mathewpeterson yes, let's go with the debian one and re-iterate later on. I would love to know how to setup the |
@lynxluna Like I said, I think there's work for me to remove this as a dependency. Currently, it uses this little project that I created a while ago: https://github.com/mathewpeterson/my-docker-environment |
Here is a quick example of how I have dockerized a Symfony application in the past.
My approach tries to adhere to the best practices for each component. E.g. send all logs to stdout, use environment variables (from 12factor.net), use of
docker-compose.override.yml
, etc.Again, please do not feel obligated to use any of this but feel free if it's something you find value in.
If you do approve of this approach, I can keep working on this PR and add documentation as well as any additional things you may want. I will also try and stay in the project Gitter if you want to communicate with me there.
/cc: @lynxluna @bepitulaz