This repository provides you a development environment without requiring you to install PHP, a web server, and any other server software on your local machine. For this, it requires Docker and Docker Compose.
Basic example to create your container (tested on Ubuntu 20.04 - Docker version 20.10.11, build dea9396 - docker-compose version 1.25.0 ):
NOTE: This package is under early development and is not ready for prime-time.
create this structure:
codeigniter/
- conf/apache.conf
- Dockerfile
- startScript.sh
Go to the codeigniter folder:
cd codeigniter
build the image:
docker build . -t codeigniter:4.1.5
start the container:
docker container run -it --publish 80:80 --name ci4 -v /localfolder:/var/www/html codeigniter:4.1.5
docker build -f Dockerfile-php7.4 -t codeigniter:4.1.5 .
docker build -f Dockerfile-php8.0 -t codeigniter:4.1.5 .
-
Install docker and docker-compose ;
-
Copy
docker-compose.yml
file to your project root path, and edit it according to your needs ; -
Uncomment, in the
docker-compose.yml
file, the image you want to use it ; -
From your project directory, start up your application by running:
docker-compose up -d
- From your project directory, stop your application by running:
docker-compose down --volumes
Contributions are welcome! Leave an issue on Github, or create a Pull Request.
This work is under MIT licence.