Docker for development in Yii framework
-
First clone the yii repo inside the folder and cms inside wordpress folder.
-
Create the runtime folder inside the yii repo. Give full privileges to assets and runtimefolder.
chmod 777 runtime and chmod 777 assets
-
Put the cms database dump inside the docker-yii folder and rename it as dump.sql.
-
Inside the docker-yii folder CMD "docker-compose build"
-
After completing the docker build do CMD "docker-compose up"
connction host : 127.0.0.1 , port : 3316 , database : cms , password : root , username : root
Important commands:
-
To check the container is running : sudo docker ps
-
To kill the running container : sudo docker kill CONTAINER_ID
-
To run the same container CMD "docker-compose up" inside docker-yii folder.
- Follow the steps : https://docs.docker.com/docker-for-mac/install/