Git Product home page Git Product logo

docker-lamp-base's Introduction

docker-lamp-base

A basic LAMP image for dependant images such as dell/wordpress.

This blueprint installs a basic LAMP stack - a popular combination of open source software components, used to build dynamic web sites.

Components

The stack comprises the following components:

Name Version Description
Ubuntu Trusty Operating system
MySQL 5.5 Database
Apache latest Web server
PHP latest Scripting language

Usage

Basic Example

Start your image binding host port 8080 to port 80 (Apache Web Server/HTTP), 443 to 443 (Apache Web Server/HTTPS) and 3306 to 3306 (MYSQL) in your container:

sudo docker run -d -p 8080:80 -p 3306:3306 -p 443:443 dell/lamp-base

Test your deployment:

curl http://localhost:8080/

Administration

Connecting to MySQL

The first time that you run your container, a new user admin with all privileges will be created in MySQL with a random password. To get the password, check the logs of the container.

sudo docker logs <container_id>

You will see some output like the following:

===================================================================
You can now connect to this MySQL Server using:

    mysql -u admin -p47nnf4FweaKu -h<host> -P<port>

Please remember to change the above password as soon as possible!
MySQL user 'root' has no password but only allows local connections
===================================================================

In this case, 47nnf4FweaKu is the password allocated to the admin user.

Remember that the root user has no password but it's only accessible from within the container.

You can now test your deployment:

 mysql -u admin -p47nnf4FweaKu -h127.0.0.1 -P3306

Connecting to MySQL from the Application

The bundled MySQL server has a root user with no password for local connections. Simply connect from your PHP code with this user:

<?php
$mysql = new mysqli("localhost", "root");
echo "MySQL Server info: ".$mysql->host_info;
?>

Reference

Image Details

Based on tutum/lamp

Pre-built Image | https://registry.hub.docker.com/u/dell/lamp-base

docker-lamp-base's People

Contributors

davidlevy avatar ghostshark avatar sakrai 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.