Coder Social home page Coder Social logo

fauria / docker-lap Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 15.0 43 KB

๐Ÿณ Linux + Apache 2.4 + PHP 5.4. CentOS 7 based. Includes .htaccess support and popular PHP5 features, including mail() function.

Home Page: https://hub.docker.com/r/fauria/lap/

License: Apache License 2.0

PHP 5.87% Shell 52.65% Dockerfile 41.49%

docker-lap's Introduction

fauria/lap

docker_logodocker_fauria_logo

Docker Pulls Docker Build Status

This Docker container implements a LAP stack, as well as some popular PHP modules and a Postfix service to allow sending emails through PHP mail() function.

If you are looking for a modern, developer friendly container for your latest app, maybe fauria/lamp suits your needs better.

Includes the following components:

  • Centos 7 base image.
  • Apache HTTP Server 2.4
  • Postfix 2.10
  • PHP 5.4
  • PHP modules
    • php-common
    • php-dba
    • php-gd
    • php-intl
    • php-ldap
    • php-mbstring
    • php-mysqlnd
    • php-odbc
    • php-pdo
    • php-pecl-memcache
    • php-pgsql
    • php-pspell
    • php-recode
    • php-snmp
    • php-soap
    • php-xml
    • php-xmlrpc

Includes support for MongoDB and ImageMagick via PECL.

Installation from Docker registry hub.

You can download the image using the following command:

docker pull fauria/lap

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.

Exposed port and volumnes

The image exposes port 80 and exports two volumes: /var/log/httpd, which contains Apache's logs, and /var/www/html, used as Apache's DocumentRoot directory.

The user and group owner id for this directory are both 48 (uid=48(apache) gid=48(apache) groups=48(apache)).

Use cases

  1. Create a temporary container for testing purposes:
	docker run --rm fauria/lap
  1. 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/lap
  1. 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-lap-container fauria/lap

docker-lap's People

Contributors

fauria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-lap's Issues

Can't see Apache logs when using docker-compose

I can't see Apache logs.

I have the following docker-compose.yaml file:

version: '3'

networks:
  frontend:
    driver: ${NETWORKS_DRIVER}
  backend:
    driver: ${NETWORKS_DRIVER}

volumes:
  mysql:
    driver: ${VOLUMES_DRIVER}
  phpmyadmin:
    driver: ${VOLUMES_DRIVER}

services:
  mysql:
    image: mysql:5.7
    command: --default-authentication-plugin=mysql_native_password
    environment:
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_USER=${MYSQL_USER}
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
    volumes:
      - ${DATA_PATH_HOST}/mysql:/var/lib/mysql
    ports:
      - "3306:3306"
    networks:
      - backend
    restart: always

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    environment:
      - PMA_ARBITRARY=1
      - MYSQL_USER=${PMA_USER}
      - MYSQL_PASSWORD=${PMA_PASSWORD}
      - MYSQL_ROOT_PASSWORD=${PMA_ROOT_PASSWORD}
    ports:
      - "${PMA_PORT}:80"
    depends_on:
      - mysql
    networks:
      - frontend
      - backend
  web:
    image: fauria/lap
    environment:
      - LOG_STDOUT=${WEB_LOG_STDOUT}
      - LOG_STDERR=${WEB_LOG_STDERR}
      - LOG_LEVEL=${WEB_LOG_LEVEL}
      - ALLOW_OVERRIDE=${WEB_ALLOW_OVERRIDE}
      - DATE_TIMEZONE=${WEB_DATE_TIMEZONE}
    volumes:
      - ${WEB_LOG_PATH}:/var/log/httpd
      - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
    ports:
      - "${WEB_HTTP_PORT}:80"
      - "${WEB_HTTPS_PORT}:443"
    networks:
      - frontend
      - backend

And the .env file:

### WEB/APACHE/PHP #################################################

WEB_LOG_STDOUT=true
WEB_LOG_STDERR=true
WEB_LOG_LEVEL=warn
WEB_ALLOW_OVERRIDE=All
WEB_DATE_TIMEZONE=Europe/Skopje
WEB_LOG_PATH=./logs/apache
WEB_HTTP_PORT=80
WEB_HTTPS_PORT=443

When WEB_LOG_STDOUT=true and WEB_LOG_STDERR=true running: docker-compose logs -f -t web doesn't show anything even if I throw an Exception from the index.php file.

If I set WEB_LOG_STDOUT=false and WEB_LOG_STDERR=false I still don't have any files into the /var/log/httpd directory.

What can be the cause of it?

restart container

Hi, i have a problem when a i stop/start the container.. doesnt start!... i've check the logs but no errors

Error While sending mail

Hi i just started using the docker and wanted to use the fauria/lap image with my iron.io worker and while trying to create a simple script to send email i am getting the following error .

sendmail: fatal: parameter inet_interfaces: no local interface found for ::1

i used the following command

sudo docker run --rm -it -v "$PWD":/worker -w /worker fauria/lap php email.php

my file email.php has the following code

<?php 
// the message
$msg = "First line of text\nSecond line of text";

// use wordwrap() if lines are longer than 70 characters
$msg = wordwrap($msg,70);

// send email
mail("[email protected]","Worker Email",$msg);

I do have th Ipv6 enabled on my ubuntu 14.04 i verified it with th command

test -f /proc/net/if_inet6 && echo "IPv6 supported" || echo "IPv6 not supported"

and i have th following lines inside the /etc/hosts

::1 ip6-localhost ip6-loopback
Not sure what else i have to update its the first time i am working with docker.

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.