Public | Automated Build

Last pushed: a year ago
Short Description
# dockerfile-php5.6.22-python2.7.11 * /php-apps * /python-apps
Full Description

dockerfile-php5.6.22-python2.7.11

Dockerfile to construct container to run PHP scripts for PHP stacks designed to run through php-fpm dispatched
through Nginx. This containers PHP configuration is not good enough to run PHP scripts using mysql().

Also contains Python2.7 equiped with pip, pythongit (for mapping storage against active branch), boto
and fabric.

MYSql DB management see https://github.com/iwd-sys/mysqldump for passing environment variables.

Extra packages include rsync for copying php into DOCUMENT_ROOT in deployment.

Good base image for current Python 2.7 development, production, and maintenence scripts

Comes with 2 directories to mount host volumes.

  • /php-apps
  • /python-apps
  • /sql

Python 3.5 might be installed.

Simple Use

docker run -t -i --name some-test-container fogcitymarathoner/dockerfile-php5.6.22-python2.7.11:latest /bin/bash

Dont forget to give container a name and delete it.

docker rm some-test-container

Use MySQL Client On MySQL Cluster

~~~~

docker run --it --rm -v /src/php-source/db_backups:/sql --link ecs-dbs-5-mysql-c088c2bdcdcf88c8ca01:mysql --rm fogcitymarathoner/dockerfile-php5.6.22-python2.7.11 sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'

by virtue of the -e the variables, below are already set in the container

  • MYSQL_PORT_3306_TCP_ADDR
  • MYSQL_PORT_3306_TCP_PORT
  • MYSQL_ENV_MYSQL_ROOT_PASSWORD

For reusing a container to develop a special purpose image to use with reusable/disposable containers down the line

involves 2 configurations

  • name the container
  • run /bin/bash in the named container, ctrl-C out

after that you reuse the container to develop

  • start container
  • attach container, repeat

tip - put variable like below in container file and source that file.

  • AWS_ACCESS_KEY_ID = xya
  • AWS_SECRET_ACCESS_KEY = deadbeef
Docker Pull Command
Owner
fogcitymarathoner