init ninedocker
This commit is contained in:
68
misc/images/nineapache8/containers/nineapache/Dockerfile
Executable file
68
misc/images/nineapache8/containers/nineapache/Dockerfile
Executable file
@ -0,0 +1,68 @@
|
||||
FROM alpine:3.18
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
sed \
|
||||
vim \
|
||||
ca-certificates \
|
||||
openldap-clients \
|
||||
wget \
|
||||
npm \
|
||||
git \
|
||||
curl \
|
||||
unzip \
|
||||
zip \
|
||||
openssl
|
||||
|
||||
RUN apk add --no-cache \
|
||||
apache2 \
|
||||
apache2-proxy \
|
||||
apache2-ssl
|
||||
|
||||
RUN apk add --no-cache \
|
||||
php81 \
|
||||
php81-apache2 \
|
||||
php81-gd \
|
||||
php81-zip \
|
||||
php81-xml \
|
||||
php81-ctype \
|
||||
php81-simplexml \
|
||||
php81-tokenizer \
|
||||
php81-sodium \
|
||||
php81-dom \
|
||||
php81-pdo \
|
||||
php81-pdo_pgsql \
|
||||
php81-pdo_mysql \
|
||||
php81-curl \
|
||||
php81-ldap \
|
||||
php81-pecl-igbinary \
|
||||
php81-session \
|
||||
php81-pecl-redis \
|
||||
php81-fileinfo \
|
||||
php81-xmlwriter \
|
||||
php81-openssl \
|
||||
php81-phar \
|
||||
php81-iconv \
|
||||
php81-mbstring \
|
||||
php81-fpm \
|
||||
php81-sockets \
|
||||
php81-opcache \
|
||||
php81-intl \
|
||||
php81-bcmath \
|
||||
php81-pecl-ssh2
|
||||
|
||||
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
RUN npm install -g n
|
||||
RUN npm install -g yarn
|
||||
|
||||
COPY apache2.sh /etc/apache2/apache2.sh
|
||||
RUN chmod +x /etc/apache2/apache2.sh
|
||||
COPY php.local.ini /etc/php81/conf.d/
|
||||
COPY apache.conf /etc/apache2/conf.d/zapp.conf
|
||||
COPY ssl.conf /etc/apache2/conf.d/ssl.conf
|
||||
COPY index.php /app/public/index.php
|
||||
|
||||
CMD /etc/apache2/apache2.sh
|
20
misc/images/nineapache8/containers/nineapache/apache.conf
Executable file
20
misc/images/nineapache8/containers/nineapache/apache.conf
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
ServerName nineapache.local
|
||||
DocumentRoot "/app/public"
|
||||
<Directory "/app/public">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
|
||||
RewriteRule .* - [E=BASE:%1]
|
||||
RewriteCond %{HTTP:Authorization} .+
|
||||
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
||||
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
||||
</Directory>
|
||||
|
27
misc/images/nineapache8/containers/nineapache/apache2.sh
Normal file
27
misc/images/nineapache8/containers/nineapache/apache2.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
envfile=/etc/apache2/conf.d/env.conf
|
||||
haveenv=/etc/apache2/haveenv.txt
|
||||
|
||||
rm -rf $envfile
|
||||
rm -rf $haveenv
|
||||
|
||||
echo "GENERATION DES VARIABLES D'ENVIRONNEMENT"
|
||||
printf "\n# Expose environment variables to scripts.\nPassEnv" >> $envfile
|
||||
compgen -e | while read name ; do
|
||||
if [[ "$name" != "TERM" && "$name" != "HOME" && "$name" != "HOSTNAME" && "$name" != "PATH" && "$name" != "PWD" && "$name" != "SHLVL" ]]
|
||||
then
|
||||
touch $haveenv
|
||||
printf " $name" >> $envfile
|
||||
fi
|
||||
done
|
||||
printf "\n" >> $envfile
|
||||
|
||||
if [[ ! -f $haveenv ]]
|
||||
then
|
||||
rm -rf $envfile
|
||||
fi
|
||||
rm -rf $haveenv
|
||||
|
||||
echo "START HTTPD"
|
||||
httpd -DFOREGROUND
|
9
misc/images/nineapache8/containers/nineapache/index.php
Normal file
9
misc/images/nineapache8/containers/nineapache/index.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
echo "<html><head><title>Nineapache 8</title></head><body>";
|
||||
echo "<h1><center>NINEAPACHE 8</center></h1>";
|
||||
|
||||
echo phpinfo();
|
||||
echo "</body></html>";
|
||||
?>
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
memory_limit = 512M
|
||||
upload_max_filesize = 512M
|
||||
post_max_size = 512M
|
43
misc/images/nineapache8/containers/nineapache/ssl.conf
Normal file
43
misc/images/nineapache8/containers/nineapache/ssl.conf
Normal file
@ -0,0 +1,43 @@
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
|
||||
|
||||
SSLRandomSeed startup file:/dev/urandom 512
|
||||
SSLRandomSeed connect builtin
|
||||
|
||||
Listen 443
|
||||
|
||||
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES:!ADH
|
||||
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES:!ADH
|
||||
SSLHonorCipherOrder on
|
||||
SSLProtocol all -SSLv3
|
||||
SSLProxyProtocol all -SSLv3
|
||||
SSLPassPhraseDialog builtin
|
||||
SSLSessionCache "shmcb:/var/cache/mod_ssl/scache(512000)"
|
||||
SSLSessionCacheTimeout 300
|
||||
|
||||
<VirtualHost _default_:443>
|
||||
DocumentRoot "/app/public"
|
||||
ServerName www.example.com:443
|
||||
ServerAdmin you@example.com
|
||||
ErrorLog logs/ssl_error.log
|
||||
TransferLog logs/ssl_access.log
|
||||
|
||||
SSLEngine on
|
||||
|
||||
SSLCertificateFile /etc/ssl/apache2/server.pem
|
||||
SSLCertificateKeyFile /etc/ssl/apache2/server.key
|
||||
|
||||
<FilesMatch "\.(cgi|shtml|phtml|php)$">
|
||||
SSLOptions +StdEnvVars
|
||||
</FilesMatch>
|
||||
<Directory "/app/public/cgi-bin">
|
||||
SSLOptions +StdEnvVars
|
||||
</Directory>
|
||||
|
||||
BrowserMatch "MSIE [2-5]" \
|
||||
nokeepalive ssl-unclean-shutdown \
|
||||
downgrade-1.0 force-response-1.0
|
||||
|
||||
CustomLog logs/ssl_request.log \
|
||||
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
||||
</VirtualHost>
|
Reference in New Issue
Block a user