-
Notifications
You must be signed in to change notification settings - Fork 0
/
php.Dockerfile
94 lines (69 loc) · 2.25 KB
/
php.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
FROM php:7.4-fpm
RUN apt-get update && \
apt-get install -y --force-yes --no-install-recommends \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev \
openssh-server \
libmagickwand-dev \
git \
nano \
libzip-dev \
zip \
libxml2-dev
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
# Install soap extention
RUN docker-php-ext-install soap
# Install for image manipulation
RUN docker-php-ext-install exif
# Install the PHP mcrypt extention (from PECL, mcrypt has been removed from PHP 7.2)
RUN pecl install mcrypt-1.0.3
RUN docker-php-ext-enable mcrypt
# Install the PHP pcntl extention
RUN docker-php-ext-install pcntl
# Install the PHP zip extention
RUN docker-php-ext-install zip
# Install the PHP pdo_mysql extention
RUN docker-php-ext-install pdo_mysql
# Install the PHP pdo_pgsql extention
RUN docker-php-ext-install pdo_pgsql
# Install the PHP bcmath extension
RUN docker-php-ext-install bcmath
#####################################
# Imagick:
#####################################
RUN pecl install imagick && \
docker-php-ext-enable imagick
#####################################
# GD:
#####################################
# Install the PHP gd library
RUN docker-php-ext-install gd && \
docker-php-ext-configure gd \
--with-jpeg=/usr/lib \
--with-freetype=/usr/include/freetype2 && \
docker-php-ext-install gd
#####################################
# PHP Memcached:
#####################################
# Install the php memcached extension
RUN pecl install memcached && docker-php-ext-enable memcached
COPY . /var/www/html/
COPY php.ini /usr/local/etc/php/conf.d/laravel.ini
RUN mv /var/www/html/.env.example /var/www/html/.env
WORKDIR /var/www/html
# Install composer and add its bin to the PATH.
RUN curl -s http://getcomposer.org/installer | php && \
echo "export PATH=${PATH}:/var/www/vendor/bin" >> ~/.bashrc && \
mv composer.phar /usr/local/bin/composer
RUN composer install
RUN usermod -u 1000 www-data
RUN chown -R www-data:www-data /var/www/html/storage
RUN php artisan key:generate