Docker Progresss 1/?

I didn't give up this time. Go me.

Below is where I've gotten to in my Joys of Docker. It's building the correct PHP versioned container, pulling down the various repositories and putting them in the correct locations. It's not running the Blog-update to generate the master content yet, getting some conflicts in when the Apache starts or not, so that will need some work. Additionally, I'm going to need to move a bunch of the build stuff out of Docker and into the Robo runner. It makes more sense the Robo runner handle the deployment of the actual code and Docker should just get the environment and initial set up ready for the code runner to execute in. That make sense? Makes sense to me.

As always, suggestions welcome.

 1FROM php:7.2-apache
 2
 3RUN apt-get update --yes
 4RUN apt-get install --yes \
 5    <All the required modules>
 6
 7# CONTENTS FROM DOCKER
 8RUN mkdir /var/www/<launchpad>
 9COPY [<Keys and the like>, "/var/www/<launchpad>/"]
10
11# ROOT
12ENV APACHE_DOCUMENT_ROOT <root>
13RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
14    && sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
15
16# APACHE
17ADD ./docker/httpd-ssl.conf /etc/apache2/sites-enabled/000-default.conf
18RUN ln -s /etc/apache2/mods-available/ssl.load  /etc/apache2/mods-enabled/ssl.load \
19    && ln -s /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/headers.load \
20    && ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load \
21# APACHE-SSL
22    && mkdir -p /etc/apache2/ssl/ \
23    && apt-get update; apt-cache policy libgnutls26 \
24    && apt-get update; apt-cache policy libgnutls27 \
25    && openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj \
26    "<Keyness>" \
27    -keyout /etc/apache2/ssl/ssl.key -out /etc/apache2/ssl/ssl.crt \
28    && mkdir -p /var/run/apache2/
29EXPOSE 443
30
31# PHP
32RUN mv "/usr/local/etc/php/php.ini-development" "/usr/local/etc/php/php.ini" \
33    && docker-php-ext-install gd \
34    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
35# COMPOSER    
36RUN chmod u+x /var/www/copy/install-composer.sh \
37    && /var/www/copy/install-composer.sh \
38    && mv composer.phar /usr/local/bin \
39    && chmod u+x /usr/local/bin/composer.phar \
40    && touch /root/.composer/composer.json \ 
41    && echo '<composer stuff>' > /root/.composer/composer.json \
42    && composer.phar global update
43
44# CODE
45# -- Some of this should be replaced with the Robo Build script
46# -- SSH KEYS
47RUN <.ssh-keystuff> \
48    && <ssh-keygen>
49# -- CLONE FROM BITBUCKET: Base App  
50ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
51RUN <git clone> \
52    && composer.phar install \
53    && <chmod + lns> \
54# -- BUILD: Base App
55# -- CLONE FROM GITHUB: Blog Generator
56# -- CLONE FROM BITBUCKET: Blog Entries
57COPY ./docker/config-test.json /var/www/<config-spot>
58
59# FINALLY
60RUN <blog-generator!>