Public Repository

Last pushed: 3 months ago
Short Description
Fpfis php56 development image
Full Description

FPFIS PHP 5.6 docker image

Content

  • Centos 6
  • PHP 5.6.30 ( CLI and Apache module)
  • Apache 2.4.25
  • Composer
  • PHP extensions :
    • gd
    • imap
    • intl
    • ldap
    • mbstring
    • mcrypt
    • mssql
    • mysqlnd
    • opcache
    • pdo
    • soap
    • xml
    • pgsql
    • pecl-redis
    • pecl-imagick
    • pecl-gnupg

Basic usage

Start a webserver

You must bind the web directory to a local volume :

docker run -v /myhostdocroot:/var/www/html -p 8080:8080 fpfis/php56

Run composer

Same as before you must bind a local volume to /var/www/html

docker run -v /myhostdocroot:/var/www/html fpfis/php56 composer install

Docker compose usage

Create a docker-compose.yml file

DOCUMENT_ROOT can be used instead of /var/www/html mounting. This is useful when the application
project root is not the actual document root for instance.

version: '2'
services:
  web:
    image: fpfis/php56
    working_dir: /project
    environment:
      - DOCUMENT_ROOT=/project/app
    volumes:
      - .:/project
    ports:
      - 8080:8080
    depends_on:
      - mysql
  mysql:
    image: fpfis/mysql56

Run it

boddigr@boddigr-laptop-03:~/Projects/europa/fpfis-manager$ docker-compose up
Starting fpfismanager_mysql_1 ... 
Starting fpfismanager_mysql_1 ... done
Recreating fpfismanager_web_1 ... 
Recreating fpfismanager_web_1 ... done
Attaching to fpfismanager_mysql_1, fpfismanager_web_1
mysql_1  | 2017-05-17 00:18:37,531 CRIT Supervisor running as root (no user in config file)
mysql_1  | 2017-05-17 00:18:37,531 INFO Included extra file "/etc/supervisor/conf.d/mysql.conf" during parsing
mysql_1  | 2017-05-17 00:18:37,539 INFO RPC interface 'supervisor' initialized
mysql_1  | 2017-05-17 00:18:37,539 CRIT Server 'unix_http_server' running without any HTTP authentication checking
mysql_1  | 2017-05-17 00:18:37,539 INFO supervisord started with pid 1
mysql_1  | 2017-05-17 00:18:38,543 INFO spawned: 'mysql' with pid 9
mysql_1  | 2017-05-17 00:18:39,938 INFO success: mysql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web_1    | 2017-05-17 00:18:42,716 CRIT Supervisor running as root (no user in config file)
web_1    | 2017-05-17 00:18:42,716 INFO Included extra file "/etc/supervisor/conf.d/httpd.conf" during parsing
web_1    | 2017-05-17 00:18:42,734 INFO RPC interface 'supervisor' initialized
web_1    | 2017-05-17 00:18:42,734 CRIT Server 'unix_http_server' running without any HTTP authentication checking
web_1    | 2017-05-17 00:18:42,734 INFO supervisord started with pid 20
web_1    | 2017-05-17 00:18:43,772 INFO spawned: 'httpd' with pid 23
web_1    | 2017-05-17 00:18:44,821 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Check if running

boddigr@boddigr-laptop-03:~/Projects/europa/fpfis-manager wget localhost:8080/info.php -O /dev/null 
--2017-05-17 11:45:51--  http://localhost:8080/info.php
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/dev/null’

/dev/null                                                       [ <=>                                                                                                                                      ] 102.71K  --.-KB/s    in 0s      

2017-05-17 11:45:51 (3.43 GB/s) - ‘/dev/null’ saved [105180]

Run command inside the composed infra

Note: you must keep the --user web set to web, this will
run the command without affecting permissions on your local dev or testing.

boddigr@boddigr-laptop-03:~/Projects/europa/fpfis-manager$ docker exec --user web fpfismanager_web_1 ./vendor/bin/propel diff
22 tables found in all databases.
Comparing models...
Same XML and database structures for all datasource - no diff to generate
Docker Pull Command
Owner
fpfis