Public Repository

Last pushed: a month ago
Short Description
PHP 7.1 development image
Full Description

FPFIS PHP 7.1 development docker image


Development tools

Basic tools from php71

  • Centos 6
  • PHP 7.1 ( 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
    • tidy

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/php71-dev

Run composer

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

docker run -v /myhostdocroot:/var/www/html fpfis/php71 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'
  # centos 6 + httpd + php${FPFIS_PHP_VERSION}
    image: fpfis/php71-dev
      - ${HTTP_PORT}:8080
    working_dir: /app/subsite
      - .:/app/subsite
      - DOCUMENT_ROOT=/app/subsite/platform
    image: blackfire/blackfire
    image: fpfis/mysql56

You must use a .env file to specify HTTP_PORT and the BLACKFIRE_ settings.

It is advised to add this file to your ignore list

# Eg .env file :

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,
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

Shell in a box

You can also access the console through http://localhost:8080/shell/

The shell runs inside the container and is at the root of the project

Docker Pull Command

Comments (0)