Docker
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps. If you want to learn more about Docker head to their What is Docker section here.
CodeIgniter
CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications. If you want to learn more then head to their official website which has great documentation as well at https://codeigniter.com/
CodeIgniter on Docker
If you’re excited about using Docker for your development and you are working on a CodeIgniter (CI) based PHP project then you are lucky. It is very easy to setup CI based project with Docker. Just follow the instructions below to setup a fresh CI project with Docker.
- Create a project folder
- Download the docker-compose.yml file into your project folder from https://raw.githubusercontent.com/bitnami/bitnami-docker-codeigniter/master/docker-compose.yml
- From the command prompt run the following command. Make sure you are in the project folder.
docker-compose up -d
It will spin up two containers—one for the app itself with Nginx and another for MariaDB for your DB. App container will create a directory in your project folder and install CodeIgniter in it.
Now browse http://localhost:8000 in your browser and you’ll see the CodeIgniter page. It’s that easy.
if i have ci project. how i can run the project in docker container?
Thank