CodeIgniter 4 — Step 2: Installing CodeIgniter in Docker containers — Avenirer

Adrian Voicu
3 min readOct 12, 2020

In the previous article we’ve set up the infrastructure that will hold our CodeIgniter application. In this tutorial we are finally going to really install CodeIgniter 4. I promise!…

If you never had the chance to follow the previous tutorial on how to build the Docker containers, or if you don’t have the nerve of following it, maybe it would be faster for you to simply clone the repository I’ve set up on Github.com: https://github.com/avenirer/CodeIgniter4-Docker-Apache-PHP-MySQL.

The end result of the cloning should look something on the line of this:

Once we’ve cloned the repository, we open the terminal in the directory where we’ve cloned the repository, and we type “docker-compose up -d “.

If, by any chance you meet an error like this: “ERROR: for codeigniter_web_1 Cannot start service web: error while creating mount source path ‘/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/ebc957f10edc09b607f3ae00d638eb7058d47ad57ae3df8c8684373c2895ecff’: mkdir /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/ebc957f10edc09b607f3ae00d638eb7058d47ad57ae3df8c8684373c2895ecff: file exists”, you most likely didn’t close properly the containers in the past. In order to get passed this error, you need to remove all…

--

--