Skip to content

Commit 5fd808b

Browse files
committed
Merge branch 'feature/dockerfile-refactoring' into develop
2 parents ac43d66 + 16c1507 commit 5fd808b

File tree

130 files changed

+367
-1008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+367
-1008
lines changed

docker-compose.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
# Main php container
33
#######################################
44
main:
5-
build: docker/main/ubuntu # dynamic ubuntu version (ansible provisioning)
6-
#build: docker/main/centos # dynamic centos version (ansible provisioning)
7-
#build: docker/main/ubuntu-hhvm # ubuntu lts with HHVM (ansible provisioning)
5+
## Ubuntu
6+
build: docker/main
7+
#dockerfile: Ubuntu-12.04 # Ubuntu 12.04 - PHP 5.3, LTS (precise)
8+
dockerfile: Ubuntu-14.04 # Ubuntu 14.04 - PHP 5.5, LTS (trusty)
9+
#dockerfile: Ubuntu-15.04 # Ubuntu 15.04 - PHP 5.6 (vivid)
10+
#dockerfile: Ubuntu-15.10 # Ubuntu 15.10 - PHP 5.6 (wily)
11+
#dockerfile: Ubuntu-HHVM # Ubuntu 14.04 - HHVM (trusty)
12+
#dockerfile: Centos-7 # CentOS 7 - PHP 5.4
813
links:
914
- mysql
1015
#- postgres

docker/main/centos/Dockerfile renamed to docker/main/Centos-7

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
FROM webdevops/php-boilerplate:centos-7
1717

18+
ENV PROVISION_PHP_DISTRIBUTION php
19+
1820
ENV PATH /opt/ansible/bin:/bin:/usr/bin:/sbin:/usr/sbin
1921
ENV PYTHONPATH /opt/ansible/lib
2022
ENV ANSIBLE_LIBRARY /opt/ansible/library
@@ -23,12 +25,12 @@ ENV ANSIBLE_LIBRARY /opt/ansible/library
2325
# Bootstrap
2426
##
2527

26-
COPY conf/locale.conf /opt/docker/locale.conf
27-
COPY bin/bootstrap.sh /opt/docker/bin/bootstrap.sh
28-
COPY bin/provision.sh /opt/docker/bin/provision.sh
29-
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
30-
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
31-
COPY provision /opt/docker/provision/
28+
COPY conf/centos/locale.conf /opt/docker/locale.conf
29+
COPY bin/centos/bootstrap.sh /opt/docker/bin/bootstrap.sh
30+
COPY bin/provision.sh /opt/docker/bin/provision.sh
31+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
32+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
33+
COPY provision /opt/docker/provision/
3234

3335
RUN bash /opt/docker/bin/bootstrap.sh
3436
RUN bash /opt/docker/bin/provision.sh bootstrap
@@ -44,8 +46,8 @@ RUN bash /opt/docker/bin/customization.sh
4446
# Config
4547
##
4648

47-
COPY entrypoint.sh /entrypoint.sh
48-
COPY conf /opt/docker/conf/
49+
COPY bin/entrypoint.sh /entrypoint.sh
50+
COPY conf/centos /opt/docker/conf/
4951

5052
EXPOSE 9000
5153

docker/main/Ubuntu-12.04

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Ubuntu PHP Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# Prebuild images:
6+
#
7+
# webdevops/php-boilerplate:ubuntu-12.04
8+
#
9+
# Official images:
10+
#
11+
# ubuntu:12.04 - PHP 5.3, LTS (precise)
12+
# https://registry.hub.docker.com/u/library/ubuntu/
13+
#
14+
#++++++++++++++++++++++++++++++++++++++
15+
16+
FROM webdevops/php-boilerplate:ubuntu-12.04
17+
18+
ENV PROVISION_PHP_DISTRIBUTION php
19+
20+
# Ensure UTF-8
21+
RUN locale-gen en_US.UTF-8
22+
ENV LANG en_US.UTF-8
23+
ENV LC_ALL en_US.UTF-8
24+
25+
##
26+
# Bootstrap
27+
##
28+
29+
COPY conf/ubuntu/locale.conf /opt/docker/locale.conf
30+
COPY bin/ubuntu/bootstrap.sh /opt/docker/bin/bootstrap.sh
31+
COPY bin/provision.sh /opt/docker/bin/provision.sh
32+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
33+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
34+
COPY provision /opt/docker/provision/
35+
36+
RUN bash /opt/docker/bin/bootstrap.sh
37+
RUN bash /opt/docker/bin/provision.sh bootstrap
38+
39+
##
40+
# Customization
41+
##
42+
43+
COPY bin/customization.sh /opt/docker/bin/customization.sh
44+
RUN bash /opt/docker/bin/customization.sh
45+
46+
##
47+
# Config
48+
##
49+
50+
COPY bin/entrypoint.sh /entrypoint.sh
51+
COPY conf/ubuntu /opt/docker/conf/
52+
53+
EXPOSE 9000
54+
55+
VOLUME /docker/
56+
WORKDIR /docker/code/
57+
58+
ENTRYPOINT ["/entrypoint.sh"]
59+
CMD ["supervisord"]

docker/main/ubuntu-hhvm/Dockerfile renamed to docker/main/Ubuntu-14.04

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
FROM webdevops/php-boilerplate:ubuntu-14.04
1717

18+
ENV PROVISION_PHP_DISTRIBUTION php
19+
1820
# Ensure UTF-8
1921
RUN locale-gen en_US.UTF-8
2022
ENV LANG en_US.UTF-8
@@ -24,12 +26,12 @@ ENV LC_ALL en_US.UTF-8
2426
# Bootstrap
2527
##
2628

27-
COPY conf/locale.conf /opt/docker/locale.conf
28-
COPY bin/bootstrap.sh /opt/docker/bin/bootstrap.sh
29-
COPY bin/provision.sh /opt/docker/bin/provision.sh
30-
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
31-
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
32-
COPY provision /opt/docker/provision/
29+
COPY conf/ubuntu/locale.conf /opt/docker/locale.conf
30+
COPY bin/ubuntu/bootstrap.sh /opt/docker/bin/bootstrap.sh
31+
COPY bin/provision.sh /opt/docker/bin/provision.sh
32+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
33+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
34+
COPY provision /opt/docker/provision/
3335

3436
RUN bash /opt/docker/bin/bootstrap.sh
3537
RUN bash /opt/docker/bin/provision.sh bootstrap
@@ -45,8 +47,8 @@ RUN bash /opt/docker/bin/customization.sh
4547
# Config
4648
##
4749

48-
COPY entrypoint.sh /entrypoint.sh
49-
COPY conf /opt/docker/conf/
50+
COPY bin/entrypoint.sh /entrypoint.sh
51+
COPY conf/ubuntu /opt/docker/conf/
5052

5153
EXPOSE 9000
5254

docker/main/Ubuntu-15.04

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Ubuntu PHP Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# Prebuild images:
6+
#
7+
# webdevops/php-boilerplate:ubuntu-15.04
8+
#
9+
# Official images:
10+
#
11+
# ubuntu:15.04 - PHP 5.6 (vivid)
12+
# https://registry.hub.docker.com/u/library/ubuntu/
13+
#
14+
#++++++++++++++++++++++++++++++++++++++
15+
16+
FROM webdevops/php-boilerplate:ubuntu-15.04
17+
18+
ENV PROVISION_PHP_DISTRIBUTION php
19+
20+
# Ensure UTF-8
21+
RUN locale-gen en_US.UTF-8
22+
ENV LANG en_US.UTF-8
23+
ENV LC_ALL en_US.UTF-8
24+
25+
##
26+
# Bootstrap
27+
##
28+
29+
COPY conf/ubuntu/locale.conf /opt/docker/locale.conf
30+
COPY bin/ubuntu/bootstrap.sh /opt/docker/bin/bootstrap.sh
31+
COPY bin/provision.sh /opt/docker/bin/provision.sh
32+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
33+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
34+
COPY provision /opt/docker/provision/
35+
36+
RUN bash /opt/docker/bin/bootstrap.sh
37+
RUN bash /opt/docker/bin/provision.sh bootstrap
38+
39+
##
40+
# Customization
41+
##
42+
43+
COPY bin/customization.sh /opt/docker/bin/customization.sh
44+
RUN bash /opt/docker/bin/customization.sh
45+
46+
##
47+
# Config
48+
##
49+
50+
COPY bin/entrypoint.sh /entrypoint.sh
51+
COPY conf/ubuntu /opt/docker/conf/
52+
53+
EXPOSE 9000
54+
55+
VOLUME /docker/
56+
WORKDIR /docker/code/
57+
58+
ENTRYPOINT ["/entrypoint.sh"]
59+
CMD ["supervisord"]

docker/main/Ubuntu-15.10

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Ubuntu PHP Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# Prebuild images:
6+
#
7+
# webdevops/php-boilerplate:ubuntu-15.10
8+
#
9+
# Official images:
10+
#
11+
# ubuntu:15.10 - PHP 5.6 (wily)
12+
# https://registry.hub.docker.com/u/library/ubuntu/
13+
#
14+
#++++++++++++++++++++++++++++++++++++++
15+
16+
FROM webdevops/php-boilerplate:ubuntu-15.10
17+
18+
ENV PROVISION_PHP_DISTRIBUTION php
19+
20+
# Ensure UTF-8
21+
RUN locale-gen en_US.UTF-8
22+
ENV LANG en_US.UTF-8
23+
ENV LC_ALL en_US.UTF-8
24+
25+
##
26+
# Bootstrap
27+
##
28+
29+
COPY conf/ubuntu/locale.conf /opt/docker/locale.conf
30+
COPY bin/ubuntu/bootstrap.sh /opt/docker/bin/bootstrap.sh
31+
COPY bin/provision.sh /opt/docker/bin/provision.sh
32+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
33+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
34+
COPY provision /opt/docker/provision/
35+
36+
RUN bash /opt/docker/bin/bootstrap.sh
37+
RUN bash /opt/docker/bin/provision.sh bootstrap
38+
39+
##
40+
# Customization
41+
##
42+
43+
COPY bin/customization.sh /opt/docker/bin/customization.sh
44+
RUN bash /opt/docker/bin/customization.sh
45+
46+
##
47+
# Config
48+
##
49+
50+
COPY bin/entrypoint.sh /entrypoint.sh
51+
COPY conf/ubuntu /opt/docker/conf/
52+
53+
EXPOSE 9000
54+
55+
VOLUME /docker/
56+
WORKDIR /docker/code/
57+
58+
ENTRYPOINT ["/entrypoint.sh"]
59+
CMD ["supervisord"]

docker/main/ubuntu/Dockerfile renamed to docker/main/Ubuntu-HHVM

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,19 @@
44
#
55
# Prebuild images:
66
#
7-
# webdevops/php-boilerplate:ubuntu-12.04
87
# webdevops/php-boilerplate:ubuntu-14.04
9-
# webdevops/php-boilerplate:ubuntu-15.04
10-
# webdevops/php-boilerplate:ubuntu-15.10
118
#
129
# Official images:
1310
#
14-
# ubuntu:12.04 - PHP 5.3, LTS (precise)
1511
# ubuntu:14.04 - PHP 5.5, LTS (trusty)
16-
# ubuntu:15.04 - PHP 5.6 (vivid)
17-
# ubuntu:15.10 - PHP 5.6 (wily)
1812
# https://registry.hub.docker.com/u/library/ubuntu/
1913
#
2014
#++++++++++++++++++++++++++++++++++++++
2115

2216
FROM webdevops/php-boilerplate:ubuntu-14.04
2317

18+
ENV PROVISION_PHP_DISTRIBUTION hhvm
19+
2420
# Ensure UTF-8
2521
RUN locale-gen en_US.UTF-8
2622
ENV LANG en_US.UTF-8
@@ -30,12 +26,12 @@ ENV LC_ALL en_US.UTF-8
3026
# Bootstrap
3127
##
3228

33-
COPY conf/locale.conf /opt/docker/locale.conf
34-
COPY bin/bootstrap.sh /opt/docker/bin/bootstrap.sh
35-
COPY bin/provision.sh /opt/docker/bin/provision.sh
36-
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
37-
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
38-
COPY provision /opt/docker/provision/
29+
COPY conf/ubuntu/locale.conf /opt/docker/locale.conf
30+
COPY bin/ubuntu/bootstrap.sh /opt/docker/bin/bootstrap.sh
31+
COPY bin/provision.sh /opt/docker/bin/provision.sh
32+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
33+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
34+
COPY provision /opt/docker/provision/
3935

4036
RUN bash /opt/docker/bin/bootstrap.sh
4137
RUN bash /opt/docker/bin/provision.sh bootstrap
@@ -51,8 +47,8 @@ RUN bash /opt/docker/bin/customization.sh
5147
# Config
5248
##
5349

54-
COPY entrypoint.sh /entrypoint.sh
55-
COPY conf /opt/docker/conf/
50+
COPY bin/entrypoint.sh /entrypoint.sh
51+
COPY conf/ubuntu-hhvm /opt/docker/conf/
5652

5753
EXPOSE 9000
5854

File renamed without changes.

0 commit comments

Comments
 (0)