Code Monkey home page Code Monkey logo

docker-lamp's Introduction

fauria/lamp

docker_logodocker_fauria_logo

This Docker container implements a last generation LAMP stack with a set of popular PHP modules. Includes support for Composer, Bower and npm package managers and a Postfix service to allow sending emails through PHP mail() function.

If you dont need support for MySQL/MariaDB, or your app runs on PHP 5.4, maybe fauria/lap suits your needs better.

Includes the following components:

  • Ubuntu 16.04 LTS Xenial Xerus base image.
  • Apache HTTP Server 2.4
  • MariaDB 10.0
  • Postfix 2.11
  • PHP 7
  • PHP modules
    • php-bz2
    • php-cgi
    • php-cli
    • php-common
    • php-curl
    • php-dbg
    • php-dev
    • php-enchant
    • php-fpm
    • php-gd
    • php-gmp
    • php-imap
    • php-interbase
    • php-intl
    • php-json
    • php-ldap
    • php-mcrypt
    • php-mysql
    • php-odbc
    • php-opcache
    • php-pgsql
    • php-phpdbg
    • php-pspell
    • php-readline
    • php-recode
    • php-snmp
    • php-sqlite3
    • php-sybase
    • php-tidy
    • php-xmlrpc
    • php-xsl
  • Development tools
    • git
    • composer
    • npm / nodejs
    • bower
    • vim
    • tree
    • nano
    • ftp
    • curl

Installation from Docker registry hub.

You can download the image using the following command:

docker pull fauria/lamp

Environment variables

This image uses environment variables to allow the configuration of some parameteres at run time:

  • Variable name: LOG_STDOUT
  • Default value: Empty string.
  • Accepted values: Any string to enable, empty string or not defined to disable.
  • Description: Output Apache access log through STDOUT, so that it can be accessed through the container logs.

  • Variable name: LOG_STDERR
  • Default value: Empty string.
  • Accepted values: Any string to enable, empty string or not defined to disable.
  • Description: Output Apache error log through STDERR, so that it can be accessed through the container logs.

  • Variable name: LOG_LEVEL
  • Default value: warn
  • Accepted values: debug, info, notice, warn, error, crit, alert, emerg
  • Description: Value for Apache's LogLevel directive.

  • Variable name: ALLOW_OVERRIDE
  • Default value: All
  • All, None
  • Accepted values: Value for Apache's AllowOverride directive.
  • Description: Used to enable (All) or disable (None) the usage of an .htaccess file.

  • Variable name: DATE_TIMEZONE
  • Default value: UTC
  • Accepted values: Any of PHP's supported timezones
  • Description: Set php.ini default date.timezone directive and sets MariaDB as well.

  • Variable name: TERM
  • Default value: dumb
  • Accepted values: dumb
  • Description: Allow usage of terminal programs inside the container, such as mysql or nano.

Exposed port and volumes

The image exposes ports 80 and 3306, and exports four volumes:

  • /var/log/httpd, containing Apache log files.
  • /var/log/mysql containing MariaDB log files.
  • /var/www/html, used as Apache's DocumentRoot directory.
  • /var/lib/mysql, where MariaDB data files are stores.

The user and group owner id for the DocumentRoot directory /var/www/html are both 33 (uid=33(www-data) gid=33(www-data) groups=33(www-data)).

The user and group owner id for the MariaDB directory /var/log/mysql are 105 and 108 repectively (uid=105(mysql) gid=108(mysql) groups=108(mysql)).

Use cases

Create a temporary container for testing purposes:

	docker run -i -t --rm fauria/lamp bash

Create a temporary container to debug a web app:

	docker run --rm -p 8080:80 -e LOG_STDOUT=true -e LOG_STDERR=true -e LOG_LEVEL=debug -v /my/data/directory:/var/www/html fauria/lamp

Create a container linking to another MySQL container:

	docker run -d --link my-mysql-container:mysql -p 8080:80 -v /my/data/directory:/var/www/html -v /my/logs/directory:/var/log/httpd --name my-lamp-container fauria/lamp

Get inside a running container and open a MariaDB console:

	docker exec -i -t my-lamp-container bash
	mysql -u root

docker-lamp's People

Contributors

fauria avatar priest671 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.