Skip to content

lyberteam/php-fpm7.0

Repository files navigation

PHP-FPM

image from official debian:jessie

Build Status Size and Layers Version Docker Pulls

PHP-FPM version - 7.0.20

DateTime - Europe/Kiev

Composer installed globally

Getting Started

This instruction will help you to launch the PHP-FPM + NGINX + DB (Postgres, or Mysql) and run your application In addition we can suggest to use different useful tools, such as Mailcatcher and so on.

Prerequisites

  1. First you have to install docker.

  2. Next step is installing the docker-compose.

  3. Create domain name of your application (of course local name) In this manual we will use domain name:
    awesome.io

  4. Choose the root folder for your application on your local machine. Let's say path to our root folder wiil be:
    /var/www/awesome/

Installing

Hope you've already installed docker and docker-compose on your machine. docker-compose.yml file lies into the awesome folder.

You need to put this file into the root directory of your project - /var/www/awesome/

Also we need to put our nginx config file with our domain. Here you can find the simpliest example: lyberteam.conf

Copy this file and put it to path /var/www/awesome/nginx/vhost/lyberteam.conf If you want change the domain name, then replace server_name lyberteam.com; - with your domain (i.e. awesome.io).
Now we should mount our config to the nginx container. To do this add this line into docker-compose.yml file.

## docker-compose.yml
...

nginx:
  container_name: awesome_nginx
  image: lyberteam/nginx-base
  ports:
     - "80:80"
  links:
     - php
  volumes_from:
     - application
  volumes:
     - ./logs/nginx:/var/log/nginx
     - ./nginx/vhost/lyberteam.conf:/etc/nginx/vhost/lyberteam.conf # <- add this line
  working_dir: /etc/nginx

...

Then you need just to run the docker-compose command in the terminal:

docker-compose up -d

After that you will see, how will the images be installed (pulled)

alt text

To check out if is everything ok - just run this command:

docker-compose ps

The last one is to make changes to your /etc/hosts file we need to make our domain (awesome.io) be reachable locally. Open it with your text editor (vim, nano etc) and add the next line:

127.0.0.1    awesome.io

Save and close.

No you type awesome.io in your favorite browser and enjoy.

Docker ags

  • lyberteam/php-fpm7.0:xdebug - with xdebug
  • lyberteam/php-fpm7.0:xtools - with xdebug and code check tools
  • lyberteam/php-fpm7.0:stable

Extensions:

  • php7.0-pgsql
  • php7.0-mysql
  • php7.0-opcache
  • php7.0-common
  • php7.0-mbstring
  • php7.0-mcrypt
  • php7.0-soap
  • php7.0-cli
  • php7.0-intl
  • php7.0-json
  • php7.0-xsl
  • php7.0-imap
  • php7.0-ldap
  • php7.0-curl
  • php7.0-gd
  • php7.0-zip
  • php7.0-dev
  • php7.0-fpm
  • php7.0-redis
  • php7.0-memcached
  • php7.0-mongodb
  • php7.0-xdebug (only for lyberteam/php-fpm7.0:xdebug or :xtools)
  • php7.0-imagick (new)

In addition

PHP Tools:

(Tools installed in lyberteam/php-fpm7.0:xtools)