Pascal PELISSIER 3 years ago
parent
commit
1a924704f5
2 changed files with 29 additions and 16 deletions
  1. 5
    16
      Dockerfile
  2. 24
    0
      scripts/apache2-foreground

+ 5
- 16
Dockerfile View File

@@ -1,6 +1,6 @@
1
-ROM debian:stretch
1
+FROM debian:stretch
2 2
 
3
-MAINTAINER Pascal <pascal.pelissier@logipro.com>
3
+LABEL maintainer="Pascal <pascal.pelissier@logipro.com>"
4 4
 
5 5
 #
6 6
 # Step 1: Installation
@@ -93,6 +93,8 @@ RUN apt-get -yqq install \
93 93
   php7.2-memcached 	\
94 94
   php7.2-redis		\
95 95
   php7.2-xdebug		\
96
+  php7.2-pspell     \
97
+  php7.2-xsl        \
96 98
   libapache2-mod-php7.2
97 99
 
98 100
 
@@ -159,18 +161,6 @@ RUN curl -sS https://getcomposer.org/installer | php && \
159 161
   mv composer.phar /usr/local/bin/composer && \
160 162
   composer global require "hirak/prestissimo:^0.3"
161 163
 
162
-### Install DRUSH (latest stable) ###
163
-# Run this in your terminal to get the latest DRUSH project version:
164
-RUN composer global require drush/drush && \
165
-  ~/.composer/vendor/bin/drush init
166
-
167
-### Install DRUPAL CONSOLE (latest version) ###
168
-# Run this in your terminal to get the latest project version:
169
-RUN curl https://drupalconsole.com/installer -L -o drupal.phar && \
170
-  mv drupal.phar /usr/local/bin/drupal && \
171
-  chmod +x /usr/local/bin/drupal  && \
172
-  drupal self-update
173
-
174 164
 # Bash setup.
175 165
 RUN echo ". /usr/share/bash-completion/bash_completion" >> ~/.bashrc && echo "alias ll='ls -lahs'" >> ~/.bashrc
176 166
 
@@ -186,7 +176,7 @@ RUN apt-get -q autoclean && \
186 176
 # Step 4: Run
187 177
 #
188 178
 
189
-# Create 'keopx' user like local machime user.
179
+# Create 'logiproop' user like local machime user.
190 180
 RUN \
191 181
   groupadd -g $UID $GID ; \
192 182
   useradd -m -u $UID -g $GID -s /bin/bash $UNAME ; \
@@ -197,7 +187,6 @@ RUN \
197 187
 WORKDIR ${DEFAULT_ROOT}
198 188
 
199 189
 # Configure templates
200
-COPY templates /etc/gotpl/
201 190
 
202 191
 COPY scripts/apache2-foreground /usr/bin/
203 192
 

+ 24
- 0
scripts/apache2-foreground View File

@@ -0,0 +1,24 @@
1
+#!/bin/bash
2
+set -eo pipefail
3
+# Apache gets grumpy about PID files pre-existing
4
+rm -f /var/run/apache2/apache2.pid
5
+
6
+_gotpl() {
7
+    if [[ -f "/etc/gotpl/$1" ]]; then
8
+        gotpl "/etc/gotpl/$1" > "$2"
9
+    fi
10
+}
11
+process_templates() {
12
+    _gotpl "vhost.conf.tmpl" "/etc/apache2/sites-enabled/000-default.conf"
13
+    _gotpl "ssmtp.conf.tmpl" "/etc/ssmtp/ssmtp.conf"
14
+    _gotpl "docker-php.ini.tmpl" "/etc/php/7.2/apache2/conf.d/zzz-docker-php.ini"
15
+    if [ 1 == "$XDEBUG_ENABLED" ]; then
16
+        _gotpl "xdebug.ini.tmpl" "/etc/php/7.2/apache2/conf.d/20-xdebug.ini"
17
+    fi
18
+}
19
+
20
+# Run templates.
21
+process_templates
22
+
23
+# exec apache2 -DFOREGROUND
24
+source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND

Loading…
Cancel
Save