CakePHP-3 with Docker

All are working with images and containers, why not CakePHP-3 using Docker in few simple steps.

Installation with Docker repo

docker pull aavrug/docker
docker images

Installation using git repo and docker

You can download the CakePHP Docker zip or clone it.

git clone https://github.com/aavrug/Docker.git
cd Docker
docker build -t <image-name> .
-t is for tag name and ‘.’ is syntax for docker so don’t miss that.
docker images

Now You have the docker image, For running the CakePHP app.

docker run -d -p 8080:3000 <image id/image name>
-d is for running as demon.
-p is for port, since our dockerfile exposing at 3000 so we are mapping 8080 port to 3000.

Now you can run localhost:8080/<app-name> or ip:8080/<app-name>.
Currently the name is docker so localhost:8080/docker

Advertisements