Commit 985bcf93 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo

remove unrelated images

parent eb36d25c
FROM php:5.6-apache
MAINTAINER Fabio Montefuscolo <fabio.montefuscolo@gmail.com>
RUN a2enmod rewrite expires ssl
# install the PHP extensions we need
RUN apt-get update \
&& apt-get install -y libpng12-dev libjpeg-dev libcurl3-dev libicu-dev libxml2-dev unzip \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mysqli opcache curl zip intl xmlrpc mbstring soap
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
RUN curl -o /tmp/moodle-2.7.zip 'https://download.moodle.org/download.php/direct/stable27/moodle-2.7.13.zip' \
&& rm -Rf /var/www/html/ \
&& mkdir -p /var/www/ \
&& unzip -d /var/www/ /tmp/moodle-2.7.zip \
&& rm /tmp/moodle-2.7.zip \
&& mv /var/www/moodle /var/www/html \
&& mkdir -p /var/www/moodledata \
&& chown -R www-data /var/www/moodledata
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt \
-subj "/C=BR/ST=SP/L=São Roque/O=Hacklab/OU=Development/CN=Dev/emailAddress=a@b.cd" \
&& mv localhost.key /etc/ssl/private/localhost.key \
&& mv localhost.crt /etc/ssl/certs/localhost.crt
COPY moodle-config.php /var/www/html/config.php
COPY docker-entrypoint.sh /entrypoint.sh
COPY default-ssl.conf /etc/apache2/sites-enabled
EXPOSE 80 443
VOLUME ["/var/www/moodledata", "/var/www/html/local"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/localhost.crt
SSLCertificateKeyFile /etc/ssl/private/localhost.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
#!/bin/bash
if [ "$OPCACHE" = "disable" ];
then
if [ -e "/var/www/html/.htaccess" ];
then
sed -i -e '/^ *php_flag \+opcache.enable/d' /var/www/html/.htaccess
fi
echo "php_flag opcache.enable Off" >> /var/www/html/.htaccess
fi
exec "$@"
\ No newline at end of file
<?php
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('DBTYPE') ?: 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = getenv('DBHOST') ?: 'database';
$CFG->dbname = getenv('DBNAME') ?: 'moodle';
$CFG->dbuser = getenv('DBUSER') ?: 'moodle';
$CFG->dbpass = getenv('DBPASS') ?: 'moodle';
$CFG->prefix = getenv('PREFIX') ?: 'mdl_';
$CFG->dboptions = array(
'dbpersist' => false,
'dbsocket' => false,
'dbport' => '3306',
);
$CFG->wwwroot = getenv('WWWROOT') ?: 'http://localhost';
$CFG->dataroot = '/var/www/moodledata';
$CFG->directorypermissions = 02777;
$CFG->admin = 'admin';
require_once(dirname(__FILE__) . '/lib/setup.php');
FROM php:5.6-apache
MAINTAINER Fabio Montefuscolo <fabio.montefuscolo@gmail.com>
RUN a2enmod rewrite expires ssl
# Install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libmemcached-dev && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mysqli opcache zip mbstring
# Support memcache
RUN printf "yes\n" | pecl install memcache \
&& echo 'extension=memcache.so' > /usr/local/etc/php/conf.d/pecl-memcache.ini
# Support memcached
RUN printf "yes\n" | pecl install memcached \
&& echo 'extension=memcached.so' > /usr/local/etc/php/conf.d/pecl-memcached.ini
# Composer facility
RUN curl -s -o installer.php https://getcomposer.org/installer \
&& php installer.php --install-dir=/usr/local/bin/ --filename=composer \
&& rm installer.php
COPY docker-entrypoint.sh /entrypoint.sh
COPY localhost.key /etc/ssl/private/localhost.key
COPY localhost.crt /etc/ssl/certs/localhost.crt
COPY default-ssl.conf /etc/apache2/sites-enabled
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/localhost.crt
SSLCertificateKeyFile /etc/ssl/private/localhost.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
#!/bin/bash
exec "$@"
\ No newline at end of file
-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIJAJ+phFCkopxaMA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJCUjEVMBMGA1UECAwMU8ODwqNvIFBhdWxvMRUwEwYDVQQHDAxTw4PCo28g
Um9xdWUxEDAOBgNVBAoMB0hhY2tsYWIxCzAJBgNVBAsMAkhMMRIwEAYDVQQDDAls
b2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmNvbnRhdG9AaGFja2xhYi5jb20uYnIw
HhcNMTYwODI0MjIyNzAxWhcNMTcwODI0MjIyNzAxWjCBlTELMAkGA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BOL0aDJlSet/
/9GI5MJgs3k7KgKhrz8ykmh/TUuYYsklRhofp4hKuggXa8EDriR2kaAOSZXc1ox4
GbbHAhL8kAkCgYEAyb6DNURsZPt1+00Iq60LpklZkp5FXcTacVkGRJzU+f2XND3e
evbgT99WDYyTjs7XYyRqgwGLHssfG5nwDcKQAKirj7qanf5xknMvNyEcFUO2O/if
K4/BQDEWpOkvMt2F/6mt0ecArexPafkYYgP1I/D5blBHYKy0ox85inoaNPECgYBT
7OOQ+yfCukgXC9ECxpoXxWvpnwh3DU9rDiqFfCHzGXyLxkbq19seMRgWtjg/Q3vE
EXbQjSP9ylM2fMAHXPcayXB6qvVMaCcfxKZCbhqKBYurjdmz3160PKitjOqYldaT
3WtKEhn1QPBxB2QCufyjB3kwrvuiqSLejqGyVXF7gQKBgHDR/6hFb93DBMeCOnNI
QrHV6poaTX58LgZeAHNbrvIZVww6EXrVb/fLBWk+u4V8nrwWMmMyn0rWDPCAA62z
qdZZ2ogP7CeAo6LQOocZkzXbDfMwwhTFGZAWS3umroSopUHuDKIHqLEtEDsHVR7r
DXDybqwMW71fdnFhLRhrJNAO
-----END PRIVATE KEY-----
FROM montefuscolo/php
MAINTAINER Fabio Montefuscolo <fabio.montefuscolo@gmail.com>
RUN curl -o tiki-wiki.tar.gz 'http://ufpr.dl.sourceforge.net/project/tikiwiki/Tiki_12.x_Altair/12.9/tiki-12.9.tar.gz'
RUN tar -C /var/www/html -zxvf tiki-wiki.tar.gz --strip 1 \
&& rm tiki-wiki.tar.gz
WORKDIR /var/www/html/
RUN { \
echo "<?php"; \
echo " \$db_tiki = getenv('TIKI_DB_DRIVER') ?: 'mysql';"; \
echo " \$dbversion_tiki = getenv('TIKI_DB_VERSION') ?: '12.9';"; \
echo " \$host_tiki = getenv('TIKI_DB_HOST') ?: 'db';"; \
echo " \$user_tiki = getenv('TIKI_DB_USER');"; \
echo " \$pass_tiki = getenv('TIKI_DB_PASS');"; \
echo " \$dbs_tiki = getenv('TIKI_DB_NAME') ?: 'tikiwiki';"; \
echo " \$client_charset = 'utf8';"; \
} > db/local.php
RUN /bin/bash htaccess.sh
RUN chown -R root:root /var \
&& find /var/www/html -type f -exec chmod 644 {} \; \
&& find /var/www/html -type d -exec chmod 755 {} \; \
&& chown -R www-data db \
&& chown -R www-data dump \
&& chown -R www-data img/wiki \
&& chown -R www-data img/wiki_up \
&& chown -R www-data img/trackers \
&& chown -R www-data modules/cache \
&& chown -R www-data styles \
&& chown -R www-data temp \
&& chown -R www-data temp/cache \
&& chown -R www-data templates \
&& chown -R www-data templates_c \
&& chown -R www-data whelp
COPY docker-entrypoint.sh /entrypoint.sh
VOLUME ["/var/www/html/files/", "/var/www/html/img/wiki/", "/var/www/html/img/wiki_up/", "/var/www/html/img/trackers/"]
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
TikiWiki
========
TikiWiki is full featured content management system written in php. You can
find more useful information at http://tiki.org
Pulling
-------
Actually, no tags are being used to this container. The tiki version available
inside container is the LTS 12.9. You can pull like below.
```
docker pull montefuscolo/tiki-wiki
```
Running
-------
Some env varibles are provided to setup the database, but you can also mount
your configurations files inside conainer. The env vars and the default values
are listed below and the names are self explanatory.
```
TIKI_DB_DRIVER=mysql
TIKI_DB_VERSION=12.9
TIKI_DB_HOST='db'
TIKI_DB_USER
TIKI_DB_PASS
TIKI_DB_NAME=tikiwiki
```
Example to get a running container below.
```
docker run --rm --name tiki --link mariadb:db \
-e TIKI_DB_USER=tiki \
-e TIKI_DB_PASS=wiki \
-p 80:80 \
-d montefuscolo/tiki-wiki
```
#!/bin/bash
if [ "$OPCACHE" = "false" ];
then
echo "php_flag opcache.enable Off" >> /var/www/html/.htaccess
fi
exec "$@"
\ No newline at end of file
FROM ubuntu:14.04.3
MAINTAINER montefuscolo/ubuntu-trusty-git <fabio.montefuscolo@gmail.com>
# install git
RUN apt-get update && \
apt-get install -y git && \
apt-get clean
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment