Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Legacy LAMP image with PHP 5.6 (EOL) & MySQL 5.7 on Ubuntu 16.04 Xenial. 🚨 Use at your own risk!

License

Notifications You must be signed in to change notification settings

jakejarvis/docker-lamp-php5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-LAMP

Docker-LAMP-PHP5 is a Docker image that includes the Phusion base along with a LAMP stack (Apache 2.4.7, MySQL 5.7 and PHP 5.6) on Ubuntu 16.04 Xenial, all in one handy container. phpMyAdmin is also bundled.

This image is only intended for legacy PHP 5.6 applications, which is end-of-life as of January 2019. Use at your own risk, preferably not in production and/or public-facing environments!

Based off an old version of mattrayner/docker-lamp.

Usage

Directory structure

/ (project root)
/app/ (your PHP files aka the web root)
/mysql/ (Docker will create this and store your MySQL data here)

Starting from command line

docker run -p "80:80" -v ${PWD}/app:/app -v ${PWD}/mysql:/var/lib/mysql gcr.io/jakejarvis/lamp-php5:latest

Starting with Docker Compose

version: "3"
services:
  lamp:
    image: gcr.io/jakejarvis/lamp-php5:latest
    ports:
      - "80:80"
    volumes:
      - "./app:/app"
      - "./mysql:/var/lib/mysql"

Starting from a Dockerfile

FROM gcr.io/jakejarvis/lamp-php5:latest

# Your custom commands

CMD ["/run.sh"]

MySQL Databases

When you first run the image, you'll see a message showing your admin user's password. This is the user you should use in your application. If you need this login later, you can run docker logs CONTAINER_ID and you should see it at the top of the log.

You can access phpMyAdmin at /phpmyadmin with the admin username and password.

By default, the image comes with a root MySQL account that has no password. This account is only available locally, i.e. within your application. It is not available from outside your Docker image or through phpMyAdmin.

License

Docker-LAMP is licensed under the Apache 2.0 License.