Cakephp3 is a web development framework which requires PHP version 5.6 and higher.
For more references check out it's official site and docs at CakePHP Documentation.
Using docker-compose.yml file (recommended for development):
version: '3'
services:
#################################################
# title: Cakephp Web Application
# author: Ronie Vincent Horca
# contact: <[email protected]>
#################################################
cakephp:
image: hxhroniegss/cakephp3
container_name: hxhronie_cakephp
ports:
- "4000:80"
depends_on:
- mysql
- phpmyadmin
volumes:
- "relative/path/to/project/root/:/var/www/html/"
environment:
- SECURITY_SALT=ashg4543323dd3434343434dsddet556kk
- MYSQL_URL=mysql
- MYSQL_USERNAME=root
- MYSQL_PASSWORD=test
mysql:
image: hxhroniegss/mysql:5.7.22
container_name: hxhronie_mysql
volumes:
- mysql_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_DATABASE=cakephp
#################################################
# phpmyadmin credentials
#################################################
# server => phpmyadmin_mysql
# user => root
# password => test
# remember to import the database tables
# to use your app
phpmyadmin:
image: phpmyadmin/phpmyadmin:4.7
container_name: hxhronie_phpmyadmin
links:
- mysql:db
depends_on:
- mysql
ports:
- "5555:80"
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
volumes:
mysql_data:
Run the following command in your terminal:
docker-compose -f path/to/compose/file/docker-compose.yml up -d
You can reference this cakephp3 image for your production dockerfile like this:
FROM hxhroniegss/cakephp3
LABEL maintainer="Ronie Vincent Horca <[email protected]>"
# Changed directory to cakephp
WORKDIR /var/www/html/src/cakephp
USER root:root
COPY ./src /var/www/html/src
RUN composer install -o \
&& chmod -R 777 bin/cake \
&& chmod -R 777 /var/www/html/src/cakephp \
&& bin/cake plugin assets symlink
Content type
Image
Digest
Size
262.6 MB
Last updated
about 8 years ago
docker pull hxhroniegss/cakephp3