Dockerfile 2.36 KB
Newer Older
1
FROM php:7.3-apache
Sebastien Rosset's avatar
Sebastien Rosset committed
2 3

RUN apt-get update
4
RUN apt-get install --yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev gnupg nano git
5
RUN apt-get -y install libzip-dev libsodium23
Sebastien Rosset's avatar
Sebastien Rosset committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

# PHP Configuration
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install bz2
RUN docker-php-ext-install calendar
RUN docker-php-ext-install dba
RUN docker-php-ext-install curl
RUN docker-php-ext-install exif
RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr
RUN docker-php-ext-install gd
RUN docker-php-ext-install gettext
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
RUN docker-php-ext-install imap
RUN docker-php-ext-install intl
RUN docker-php-ext-install soap
RUN docker-php-ext-install tidy
RUN docker-php-ext-install xmlrpc
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install simplexml
RUN docker-php-ext-install xsl
RUN docker-php-ext-install zip
RUN docker-php-ext-configure hash --with-mhash

29 30 31
RUN printf "\n" | pecl install libsodium \
     && docker-php-ext-enable sodium

32
# MongoDB extension
33
RUN printf "\n" | pecl install mongodb \
34 35 36 37 38 39 40
     && docker-php-ext-enable mongodb

# Imagemagick
RUN apt-get install --yes libmagickwand-dev libmagickcore-dev imagemagick
RUN printf "\n" | pecl install imagick
RUN docker-php-ext-enable imagick

Sebastien Rosset's avatar
Sebastien Rosset committed
41 42 43 44 45 46 47 48 49 50
# Apache Configuration
RUN a2enmod rewrite
RUN a2enmod headers

# SSL
RUN a2enmod ssl
RUN a2ensite default-ssl
RUN openssl req -subj '/CN=example.com/O=My Company Name LTD./C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem

# Composer
51
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Sebastien Rosset's avatar
Sebastien Rosset committed
52

53 54 55
# Prestissimo
RUN composer global require hirak/prestissimo --prefer-dist --no-progress --no-suggest --classmap-authoritative

Sebastien Rosset's avatar
Sebastien Rosset committed
56
# Node & NPM
57 58 59
RUN curl -sL https://deb.nodesource.com/setup_10.x  | bash -
RUN apt-get --yes install nodejs
RUN curl -L https://npmjs.org/install.sh | sh
Sebastien Rosset's avatar
Sebastien Rosset committed
60 61 62 63 64 65 66 67 68 69 70

# Gulp
RUN npm install -g gulp

# Config files
COPY custom-php-conf.ini /usr/local/etc/php/conf.d/
COPY apache.conf /etc/apache2/sites-available/000-default.conf

# We don't need this directory
RUN rm -R /var/www/html

Sebastien Rosset's avatar
Sebastien Rosset committed
71
WORKDIR /var/www
72 73

RUN apt-get install unzip