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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s