############################################################ # Dockerfile to build default CONTENTSERV CS16.1 environment # Based on Ubuntu 16.04 ############################################################ FROM ubuntu:xenial ENV DEBIAN_FRONTEND noninteractive ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV TERM=xterm ############### # install utils ############### RUN apt-get update && apt-get -y install vim htop software-properties-common python-software-properties ##################### #add additional repos ##################### RUN apt-get install -y language-pack-en-base && \ export LC_ALL=en_US.UTF-8 && \ export LANG=en_US.UTF-8 && \ apt-get install -y software-properties-common && \ add-apt-repository ppa:jonathonf/ffmpeg-3 ######## #install ######## RUN apt-get update && apt-get -y --force-yes upgrade && \ apt-get -y --force-yes install apache2 libapache2-mod-php7.0 php7.0 php7.0-bcmath php7.0-bz2 \ php7.0-cgi php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-gmp \ php-http php-imagick php7.0-imap php7.0-intl php7.0-json php7.0-ldap \ php7.0-mbstring php7.0-mcrypt php-memcache php7.0-mysql php7.0-recode \ php7.0-soap php-xdebug php7.0-xml php7.0-xsl php7.0-zip php7.0-opcache \ curl ghostscript barcode libimage-exiftool-perl wget supervisor msmtp vim && \ apt-get clean RUN apt-get -y --force-yes install openjdk-8-jdk aspell aspell-af aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy \ aspell-da aspell-de aspell-de aspell-de-alt aspell-doc aspell-doc aspell-el aspell-en aspell-eo aspell-es aspell-et aspell-eu aspell-fa aspell-fo \ aspell-fr aspell-ga aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-id aspell-is aspell-it aspell-kk aspell-kn aspell-ku \ aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-no aspell-nr aspell-ns aspell-or aspell-pa aspell-pl aspell-pt aspell-ro aspell-ru aspell-sk aspell-sl \ aspell-st aspell-sv aspell-ta aspell-te aspell-tl aspell-tn aspell-ts aspell-uk aspell-uz aspell-xh aspell-zu barcode catdoc ffmpeg fonts-dejavu-core \ fonts-dejavu-extra fonts-liberation fonts-lmodern fonts-ubuntu-font-family-console gettext ghostscript intltool-debian javascript-common libapache2-mod-fcgid \ libapache2-mod-gnutls libimage-exiftool-perl libwmf-bin memcached mysql-client poppler-utils qrencode redis-server smbclient spellutils subversion-tools \ tk unzip wngerman xpdf zip #################################### # ImageMagick #################################### RUN sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list RUN apt-get update && apt-get -y install libtiff5-dev && apt-get -y build-dep imagemagick RUN apt-get -y --force-yes install build-essential checkinstall libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev RUN cd /opt && cd /opt && wget "http://www.imagemagick.org/download/releases/ImageMagick-6.9.4-10.tar.xz" && tar -xf ImageMagick-6.9.4-10.tar.xz && \ cd ImageMagick-6.9.4-10 && ./configure -q && make && make install RUN ln -s /opt/ImageMagick-6.9.4-10/utilities/convert /usr/bin/convert && \ ln -s /opt/ImageMagick-6.9.4-10/utilities/mogrify /usr/bin/ && \ ln -s /opt/ImageMagick-6.9.4-10/utilities/identify /usr/bin/ && ldconfig /usr/local/lib #################################### # Cassandra #################################### RUN apt-get install -y --force-yes libgmp-dev php7.0-dev openssl net-tools netcat python-pip RUN apt-get -y --force-yes install libssl-dev php-pear && cd /opt && \ wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/dependencies/libuv/v1.11.0/libuv_1.11.0-1_amd64.deb && \ wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/dependencies/libuv/v1.11.0/libuv-dev_1.11.0-1_amd64.deb && \ wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/cassandra/v2.6.0/cassandra-cpp-driver-dev_2.6.0-1_amd64.deb && \ wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/cassandra/v2.6.0/cassandra-cpp-driver_2.6.0-1_amd64.deb && \ dpkg -i libuv_1.11.0-1_amd64.deb && \ dpkg -i libuv-dev_1.11.0-1_amd64.deb && \ dpkg -i cassandra-cpp-driver_2.6.0-1_amd64.deb && \ dpkg -i cassandra-cpp-driver-dev_2.6.0-1_amd64.deb && \ pecl install cassandra-1.3.0 RUN pip install cassandra-driver ENV CQLSH_NO_BUNDLED=true ########### # configure ########### ADD cs-php.ini /etc/php/7.0/mods-available/ ADD cs-cassandra.ini /etc/php/7.0/mods-available/ ADD cs-apache.conf /etc/apache2/conf-available/ ADD security.conf /etc/apache2/conf-available/ RUN \ /usr/sbin/phpenmod cs-php && \ /usr/sbin/a2enconf cs-apache && \ /usr/sbin/a2enmod rewrite deflate expires cgi && \ /usr/sbin/phpenmod cs-cassandra #/usr/sbin/a2dismod 'mpm_*' # #mpm_prefork COPY etc /usr/local/etc COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf RUN \ chmod 600 /usr/local/etc/msmtprc/msmtprc && \ chown www-data:www-data /usr/local/etc/msmtprc/msmtprc EXPOSE 80 20 21 9042 VOLUME ["/var/www/html/"] CMD /usr/bin/supervisord -c /etc/supervisor/supervisord.conf