• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Investigating Docker

#1
I am investigating using Docker with my existing CI app. What concerns me (from my reading) is that Docker is "environment-agnostic", a part of which seems to be  setting a container to read only. I plan on using 3 Bitnami containers (as per the bitnami documentation), one for Apache, one for php-fpm, and one for MariaDB. What I am concerned about is the way that CI writes out to files to keep track of things such as session variables (actually i don't remember the details but I do remember that something gets written out). 

My plan is to set up a development environment on my Laptop for development and testing. Debugging on the server almost "killed me". Anyone done any investigation into using Docker?
proof that an old dog can learn new tricks
Reply

#2
I use multiple docker containers and Kubernetes on AWS.

Not sure what your concerns are, you just need to make sure you map and plan your application correctly. For one, i'd definitely not be using file based sessions on docker. I'd a database/redis/dynamodb based session store. Otherwise, Docker is great for deployments and unit testing.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply

#3
great. what did you use as the image? I am using bitnami LAMP now and I'd like o stick with that in the container.(s)
proof that an old dog can learn new tricks
Reply

#4
(08-19-2019, 06:58 PM)richb201 Wrote: great. what did you use as the image? I am using bitnami LAMP now and I'd like o stick with that in the container.(s)

Honestly, mostly of my workload in kubernetes is actually in NodeJS not php. I use an alpine build.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply

#5
Thanks. I am just starting out with Docker and don't think I have enough traffic to justify a swarm. Just the basics. I am using bitnami and they claim to have an apache image, a PHP, a mariaDB, and a Codeigniter image. But what do I do with my code? And I also use grocery crud. Does that preclude me from using the prebuilt images? Must I roll my own? Or can I layer my stuff on top with docker-compose?
proof that an old dog can learn new tricks
Reply

#6
You can definitely layer stuff with docker-compose. Before diving into it too much, i'd make sure it's something that is right for you. It can be really powerful but very finicky.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply

#7
(09-17-2019, 05:12 PM)albertleao Wrote: You can definitely layer stuff with docker-compose. Before diving into it too much, i'd make sure it's something that is right for you. It can be really powerful but very finicky.
I can see that! I need to be able to develop and unit/alpha test on my laptop. I took the udemy Docker Mastery course but at least half of it was swarms, which I don't think I need. Layering might be the right thing for me. I don't want to start creating images if I don't have to.

But looking through some examples, it seems that the layering is done with Dockerfile and docker build. So let's say I start with the Code igniter image, then I need to layer on Grocery Crud. I am using the free version, btw, which is a little worrying but I don't want to change too many things at one time. I am also using php 5.6 and CI 3.

So where do I load my code from? Or do I just build an image of my CI development environment directly and then use that as a layer on the Bitnami code igniter image? 

Does anyone know if that is a reasonable way to go?
proof that an old dog can learn new tricks
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.