|
1 | | -## Docker Image for CodeIgniter4 development |
2 | | -[](https://hub.docker.com/r/atsanna/codeigniter4/) |
3 | | -[](https://hub.docker.com/r/atsanna/codeigniter4/) |
4 | | - |
5 | | - |
6 | | -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. |
7 | | - |
8 | | -Basic example to create your container (tested on Ubuntu 18.04 - Docker version 19.03.5, build 633a0ea838): |
9 | | - |
10 | | -**NOTE: This package is under early development and is not ready for prime-time.** |
11 | | - |
12 | | -## Build Image |
13 | | - |
14 | | -create this structure: |
15 | | -``` |
16 | | -codeigniter/ |
17 | | - - conf/apache.conf |
18 | | - - Dockerfile |
19 | | - - startScript.sh |
20 | | -``` |
21 | | - |
22 | | -Go to the codeigniter folder: |
23 | | -``` |
24 | | -cd codeigniter |
25 | | -``` |
26 | | - |
27 | | -build the image:<br> |
28 | | -``` |
29 | | -docker build . -t codeginiter:4.0.4 |
30 | | -``` |
31 | | - |
32 | | -start the container: |
33 | | -``` |
34 | | -docker container run --publish 80:80 --name ci4 -v /localfolder:/var/www/html codeginiter:4.0.4 |
35 | | -``` |
36 | | - |
37 | | -## Installation |
38 | | - |
39 | | -1. Install [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/) ; |
40 | | - |
41 | | -2. Copy `docker-compose.yml` file to your project root path, and edit it according to your needs ; |
42 | | - |
43 | | -3. From your project directory, start up your application by running: |
44 | | - |
45 | | -```sh |
46 | | -docker-compose up -d |
47 | | -``` |
48 | | - |
49 | | -4. From your project directory, stop your application by running: |
50 | | - |
51 | | -```sh |
52 | | -docker-compose down --volumes |
53 | | -``` |
54 | | - |
55 | | -## Contributing |
56 | | - |
57 | | -Contributions are welcome! |
58 | | -Leave an issue on Github, or create a Pull Request. |
59 | | - |
60 | | - |
61 | | -## Licence |
62 | | - |
63 | | -This work is under [MIT](LICENSE) licence. |
| 1 | +## Docker Image for CodeIgniter4 development |
| 2 | +[](https://hub.docker.com/r/atsanna/codeigniter4/) |
| 3 | +[](https://hub.docker.com/r/atsanna/codeigniter4/) |
| 4 | + |
| 5 | + |
| 6 | +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. |
| 7 | + |
| 8 | +Basic example to create your container (tested on Ubuntu 18.04 - Docker version 19.03.5, build 633a0ea838): |
| 9 | + |
| 10 | +**NOTE: This package is under early development and is not ready for prime-time.** |
| 11 | + |
| 12 | +## Build Image |
| 13 | + |
| 14 | +create this structure: |
| 15 | +``` |
| 16 | +codeigniter/ |
| 17 | + - conf/apache.conf |
| 18 | + - Dockerfile |
| 19 | + - startScript.sh |
| 20 | +``` |
| 21 | + |
| 22 | +Go to the codeigniter folder: |
| 23 | +``` |
| 24 | +cd codeigniter |
| 25 | +``` |
| 26 | + |
| 27 | +build the image:<br> |
| 28 | +``` |
| 29 | +docker build . -t codeginiter:4.0.4 |
| 30 | +``` |
| 31 | + |
| 32 | +start the container: |
| 33 | +``` |
| 34 | +docker container run --publish 80:80 --name ci4 -v /localfolder:/var/www/html codeginiter:4.0.4 |
| 35 | +``` |
| 36 | + |
| 37 | +## Installation |
| 38 | + |
| 39 | +1. Install [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/) ; |
| 40 | + |
| 41 | +2. Copy `docker-compose.yml` file to your project root path, and edit it according to your needs ; |
| 42 | + |
| 43 | +3. From your project directory, start up your application by running: |
| 44 | + |
| 45 | +```sh |
| 46 | +docker-compose up -d |
| 47 | +``` |
| 48 | + |
| 49 | +4. From your project directory, stop your application by running: |
| 50 | + |
| 51 | +```sh |
| 52 | +docker-compose down --volumes |
| 53 | +``` |
| 54 | + |
| 55 | +## Contributing |
| 56 | + |
| 57 | +Contributions are welcome! |
| 58 | +Leave an issue on Github, or create a Pull Request. |
| 59 | + |
| 60 | + |
| 61 | +## Licence |
| 62 | + |
| 63 | +This work is under [MIT](LICENSE) licence. |
0 commit comments