Public | Automated Build

Last pushed: a year ago
Short Description
Basic container to develop with PHP 7, Nginx and Laravel
Full Description

Image Contents

  • Ubuntu 14.04
  • NodeJS 5.x
  • Npm
  • Gulp
  • PHP 7
  • Composer
  • Nginx
  • Supervisor

Usage

With AZK

Example of using this image with azk:

systems({
  "app": {
    // Dependent systems
    depends: [], // postgres, mysql, mongodb ...
    // More images:  http://images.azk.io
    image: {"docker": "lukz/php-fpm"},
    // Steps to execute before running instances
    provision: [
      // "composer install",
    ],
    workdir: "/azk/#{manifest.dir}",
    shell: "/bin/bash",
    wait: {"retry": 20, "timeout": 1000},
    mounts: {
      '/azk/#{manifest.dir}': path(".")
    },
    scalable: {"default": 1},
    http: {
      // app.dev.azk.io
      domains: [ "#{system.name}.#{azk.default_domain}" ]
    },
    ports: {
      // exports global variables
      http: "80/tcp",
    },
    envs: {
      // set instances variables
      APP_DIR: "/azk/#{manifest.dir}",
    },
  },
});

Usage with docker

To run the image and bind to port 80:

$ docker run -d -p 80:80 -v "$PWD":/var/www lukz/php-fpm:latest

Environment Variables

The following PHP settings can be customized via environment variables:

Setting Env Var Default
error_reporting PHP_ERROR_REPORTING E_ALL
display_errors PHP_DISPLAY_ERRORS On
memory_limit PHP_MEMORY_LIMIT 512M
date.timezone PHP_TIMEZONE UTC
upload_max_filesize PHP_UPLOAD_MAX_FILESIZE 100M
post_max_size PHP_POST_MAX_SIZE 100M

So for example, if you want to change the error reporting and display errors you can override on the container
creation.

With azk

systems({
  "app": {
    ...
    envs: {
      // set instances variables
      APP_DIR: "/azk/#{manifest.dir}",
      PHP_ERROR_REPORTING: "E_STRICT",
      PHP_DISPLAY_ERRORS: "Off"
    }
  },
});

With docker

$ docker run -d -p 80:80 -v -e PHP_ERROR_REPORTING=E_STRICT -e PHP_DISPLAY_ERRORS=Off "$PWD":/var/www lukz/php-fpm:latest
Docker Pull Command
Owner
lukz
Source Repository

Comments (0)