Giter Club home page Giter Club logo

local-lamp's Introduction

davask/local-lamp

docker_logodocker_davask_logo

Davask Network status

DOCKER

Docker Version Docker Size Docker Pulls Docker Cloud Build Status

GITHUB

Github Code Size Github Directory File Count Github Total Lines

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 davask/lap suits your needs better.

Includes the following components:

  • Debian 10 LTS Buster base image.
  • Apache HTTP Server 2.4
  • MariaDB 10.0
  • Postfix 2.11
  • PHP 8
  • PHP modules
    • php
    • php-cgi
    • php-cli
    • php-common
    • php-curl
    • php-dev
    • php-fpm
    • php-gd
    • php-imagick
    • php-mbstring
    • php-mysql
    • php-opcache
    • php-readline
    • php-ssh2
    • php-xml
    • php-zip
    • php-intl
    • php-mcrypt
    • php-yaml
    • php-imap
  • Development tools
    • cron
    • curl
    • expect
    • dos2unix
    • ftp
    • nano
    • sed
    • tree
    • unzip
    • vim
    • wget
    • zip
    • git
    • composer
    • npm / nodejs (todo)
    • bower (todo)

Installation from Docker registry hub.

You can download the image using the following command:

docker pull davask/local-lamp

Environment variables

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

  • Variable name:
  • Default value:
  • Accepted values:
  • Description:

Exposed port and volumes

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

  • /dwl/home/host, containing the user host files
  • /var/lib/mysql, where MariaDB data files are stored.
  • /etc/apache2/sites-available, where Apache sites availables files are stored.
  • /etc/apache2/ssl, where Apache ssl files are stored.
  • /etc/letsencrypt, where Let's Encrypt files are stored.

Please, refer to https://docs.docker.com/storage/volumes for more information on using host volumes.

The user and group owner id for the DocumentRoot directory /dwl/home/host 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 davask/local-lamp bash

Create a temporary container to debug a web app:

	docker run --rm -p 8080:80 -v ./volumes/home/host:/dwl/home/host davask/local-lamp

Create a container linking to another MySQL container:

	docker run -d --link my-mysql-container:mysql -p 8080:80 -v ./volumes/home/host:/dwl/home/host --name my-lamp-container davask/local-lamp

Get inside a running container and open a MariaDB console:

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

Using docker-composer

    docker network create -d bridge --subnet 192.168.0.0/24 --gateway 192.168.0.1 dwlhost
    docker-compose up -d
    docker-compose down
    docker exec -ti <nom de l instance> bash

to get localhost mysql ip address

    ping host.docker.internal 
    add ip to docker /etc/hosts

local-lamp's People

Contributors

marascott avatar

Watchers

 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.