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

Commit 9335e6f

Browse files
committed
clean up and expose 3306
1 parent 17cf8a5 commit 9335e6f

7 files changed

+36
-51
lines changed

.dockerignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
.gitignore
22
CHANGELOG.md
3-
circle.yml
4-
docker-compose.test.yml
5-
docs/
6-
tests/
7-
LICENSE
8-
README.md
3+
LICENSE.md
4+
README.md

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
.idea
2-
tests/actual

Dockerfile

+24-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,29 @@ RUN add-apt-repository -y ppa:ondrej/php && \
2525
add-apt-repository -y ppa:ondrej/php5-compat && \
2626
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \
2727
apt-get update && \
28-
apt-get -y dist-upgrade && \
29-
apt-get -y install supervisor wget curl git zip unzip pwgen apache2 mysql-server-5.7 php5.6 libapache2-mod-php5.6 php5.6-mysql php5.6-mcrypt php5.6-gd php5.6-xml php5.6-mbstring php5.6-gettext php5.6-zip php5.6-curl && \
30-
apt-get -y autoremove
28+
apt-get -y upgrade && \
29+
apt-get -y --no-install-recommends install \
30+
supervisor \
31+
wget \
32+
curl \
33+
git \
34+
zip \
35+
unzip \
36+
pwgen \
37+
apache2 \
38+
mysql-server-5.7 \
39+
php5.6 \
40+
libapache2-mod-php5.6 \
41+
php5.6-mysql \
42+
php5.6-mcrypt \
43+
php5.6-gd \
44+
php5.6-xml \
45+
php5.6-mbstring \
46+
php5.6-gettext \
47+
php5.6-zip \
48+
php5.6-curl && \
49+
apt-get -y autoremove && \
50+
rm -rf /var/lib/apt/lists/*
3151

3252
# Point CLI to use PHP 5.6
3353
RUN ln -sfn /usr/bin/php5.6 /etc/alternatives/php
@@ -39,7 +59,7 @@ ADD config/create_mysql_users.sh /create_mysql_users.sh
3959
ADD config/run.sh /run.sh
4060
RUN chmod 755 /*.sh
4161

42-
# Add better default configurations
62+
# Add sensible default configurations
4363
ADD config/supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf
4464
ADD config/supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf
4565
ADD config/mysqld_innodb.cnf /etc/mysql/conf.d/mysqld_innodb.cnf
@@ -69,9 +89,6 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&
6989
php -r "unlink('composer-setup.php');" && \
7090
mv composer.phar /usr/local/bin/composer
7191

72-
# Set "secure" MySQL admin password
73-
ENV MYSQL_PASS:-$(pwgen -s 12 1)
74-
7592
# Enable mod_rewrite
7693
RUN a2enmod rewrite
7794

app/index.php

+4-12
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,19 @@
55
<html lang=en>
66
<head>
77
<meta charset=utf-8>
8-
<title>Hello World from Docker-LAMP</title>
9-
8+
<title>Hello World from PHP 5 on Docker</title>
109
<style>
11-
@import 'https://fonts.googleapis.com/css?family=Montserrat|Raleway|Source+Code+Pro';
12-
13-
body { font-family: 'Raleway', sans-serif; }
14-
h2 { font-family: 'Montserrat', sans-serif; }
10+
body { font-family: sans-serif; }
1511
pre {
16-
font-family: 'Source Code Pro', monospace;
17-
12+
font-family: monospace;
1813
padding: 16px;
1914
overflow: auto;
2015
font-size: 85%;
2116
line-height: 1.45;
2217
background-color: #f7f7f7;
2318
border-radius: 3px;
24-
2519
word-wrap: normal;
2620
}
27-
2821
.container {
2922
max-width: 1024px;
3023
width: 100%;
@@ -36,11 +29,10 @@
3629
<div class="container">
3730
<header>
3831
<img src="https://cdn.rawgit.com/mattrayner/docker-lamp/831976c022782e592b7e2758464b2a9efe3da042/docs/logo.svg" alt="Docker LAMP logo" />
39-
<h2>Welcome to <a href="https://github.com/mattrayner/docker-lamp" target="_blank">Docker-Lamp</a> a.k.a mattrayner/lamp</h2>
4032
</header>
4133
<article>
4234
<p>
43-
For documentation, <a href="https://github.com/mattrayner/docker-lamp" target="_blank">click here</a>.
35+
Hello World! Documentation can be <a href="https://github.com/jakejarvis/docker-lamp-php5" target="_blank">found on GitHub</a>.
4436
</p>
4537
</article>
4638
<section>

config/apache_default

+4-22
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,23 @@
22
ServerAdmin webmaster@localhost
33

44
DocumentRoot /var/www/html
5-
<Directory />
6-
Options Indexes FollowSymLinks MultiViews
7-
# To make wordpress .htaccess work
8-
AllowOverride All
9-
Order allow,deny
10-
allow from all
11-
</Directory>
125
<Directory /var/www/html>
136
Options Indexes FollowSymLinks MultiViews
14-
# To make wordpress .htaccess work
157
AllowOverride All
168
Order allow,deny
17-
allow from all
9+
Allow from all
1810
</Directory>
1911

2012
Alias /phpmyadmin /var/www/phpmyadmin
21-
<Directory /phpmyadmin>
22-
Options Indexes FollowSymLinks MultiViews
23-
# To make wordpress .htaccess work
24-
AllowOverride All
25-
Order allow,deny
26-
allow from all
27-
</Directory>
2813
<Directory /var/www/phpmyadmin>
2914
Options Indexes FollowSymLinks MultiViews
30-
# To make wordpress .htaccess work
3115
AllowOverride All
3216
Order allow,deny
33-
allow from all
17+
Allow from all
3418
</Directory>
3519

3620
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
37-
<Directory "/usr/lib/cgi-bin">
21+
<Directory /usr/lib/cgi-bin>
3822
AllowOverride None
3923
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
4024
Order allow,deny
@@ -49,9 +33,7 @@
4933

5034
CustomLog ${APACHE_LOG_DIR}/access.log combined
5135

52-
#
5336
# Set HTTPS environment variable if we came in over secure
54-
# channel.
37+
# channel.
5538
SetEnvIf x-forwarded-proto https HTTPS=on
56-
5739
</VirtualHost>

config/supervisord-apache2.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
command=/start-apache2.sh
33
numprocs=1
44
autostart=true
5-
autorestart=true
5+
autorestart=true

config/supervisord-mysqld.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
command=/start-mysqld.sh
33
numprocs=1
44
autostart=true
5-
autorestart=true
5+
autorestart=true

0 commit comments

Comments
 (0)