Public | Automated Build

Last pushed: a month ago
Short Description
.
Full Description

Build custom php-fpm docker image

Build php-fpm docker image

docker build --rm -f Dockerfile.php -t tinklabs/php:5.6-fpm .

Push php-fpm docker image

docker push tinklabs/php:5.6-fpm

Build php + nginx docker image

docker build --rm -f Dockerfile.php-nginx -t tinklabs/php-nginx:5.6 .

Experimental Docker Build

Build alpine php + nginx docker image

docker build --rm -f Dockerfile.php-nginx-alpine -t tinklabs/php-nginx:5.6-alpine .
docker build --rm -f Dockerfile.php7-nginx-alpine -t tinklabs/php-nginx:7-alpine .

Build php + apache docker image

docker build --rm -f Dockerfile.php-apache -t tinklabs/php-apache:5.6 .

Build php7-fpm docker image

docker build --rm -f Dockerfile.php7 -t tinklabs/php:7.1.1-fpm .

Build php7 + nginx docker image

docker build --rm -f Dockerfile.php7-nginx -t tinklabs/php-nginx:7.1.1 .

Build beanstalkd docker image

docker build --rm -f beanstalkd/Dockerfile -t tinklabs/beanstalkd:1.10 .

Build node docker image

docker build --rm -f node/Dockerfile -t tinklabs/node:6.9.5 .

Clean docker rubbish

docker rm -f `docker ps -a | grep Exited | awk '{print $1}'`
docker rmi `docker images | grep none | awk '{print $3}'`

Run docker containers

HOSTNAME=$HOSTNAME docker-compose -f ${platform}.yml up -d

Set Up Local Development Environment

  • Install docker first
  • Get the source code of backend2
    #create your own development folder if any
    mkdir ~/Development
    cd ~/Development
    #git clone backend2 for all branches if any
    git clone git@github.com:TinkLabs/backend2.git
    cd backend2
    git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
    git fetch --all
    git pull --all
    
  • Get the DevOps script
    #git clone DevOps in the same directory level of backend2
    cd ..
    git clone --dept=1 git@github.com:TinkLabs/DevOps.git
    cd DevOps/docker/backend2/
    
  • Launch the local development docker containers
    .\ldev.sh
    
  • Import the dummy database into local mysql containers
    .\ldev_db.sh
    
  • Check ~/Development/backend2/htdocs/app/Config/database.php for default ldev db access
  • Visit https://ldev.handy.travel and have fun
  • Run test case inside docker locally
    docker exec -u web backend2 bash -c "cd /var/www/html/app/ && yes | Console/cake composer.c install; ./Console/cake test app All --stderr; ./Vendor/bin/phpunit Packages/"
    
Docker Pull Command
Owner
tinklabs
Source Repository

Comments (0)