Welcome Guest, Not a member yet? Register   Sign In
Is there a ready-to-use and production-ready Docker container for CodeIgniter?
#6

(05-30-2024, 05:41 PM)tarcisiodev1 Wrote:
(05-30-2024, 03:24 AM)Bosborne Wrote: That container uses Ubuntu and is quite old.  I have a Dockerfile that I am getting ready to use in production using the official php image.  It is based on Debian Slim and the variant I use has a builtin Apache web server.  They keep the image up to date with the latest php patches and OS versions.

I use my Dockerfile with several CI4 projects and may need to pare out extra files not néeded.  It could be used along with the appstarter. Were you expecting something using Docker Volumes to mount your code? My current Dockerfile does not automatically run “composer install” but I run it from the container using docker exec.

Hi Bosborne,

Thanks for your response!

Your Dockerfile seems to be an excellent base for a production environment. I am particularly interested in how you are handling the built-in Apache and keeping PHP and OS versions up to date.

Yes, I am looking for something using Docker Volumes to mount the code, as it greatly facilitates continuous development and deployment. Running "composer install" manually inside the container with docker exec seems practical and should work well.

Could you share your Dockerfile or a repository where I can see it in action? Additionally, any documentation or example of how you are using it would be very helpful.

Thanks in advance for your help!
In the Dockerfile, I patch the OS to the latest patches. The official PHP image handles the php & Apache updates, if you use the appropriate tags, For instance, I tag at PHP 8.3 to get all patches but can control moving to 8.4 after it is released. Similarly, I include the Debian version in the tag.

Hopefully I can find time to share this better.
Reply


Messages In This Thread
RE: Is there a ready-to-use and production-ready Docker container for CodeIgniter? - by Bosborne - 05-31-2024, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB