-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
120 lines (87 loc) · 2.83 KB
/
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Set master image
FROM php:7.2-fpm
# Copy composer.lock and composer.json
# COPY ./puntodeventa/composer.lock ./puntodeventa/composer.json /var/www/html/
# Set working directory
WORKDIR /var/www/html
# Install Additional dependencies
# Install system dependencies
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 \
unzip \
git \
cron \
nano \
libxml2-dev \
libc-client-dev libkrb5-dev && rm -r /var/lib/apt/lists/*
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap
# 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.1
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-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2 && \
docker-php-ext-install gd
#####################################
# xDebug:
#####################################
# Install the xdebug extension
RUN pecl install xdebug
#####################################
# PHP Memcached:
#####################################
# Install the php memcached extension
RUN pecl install memcached && docker-php-ext-enable memcached
#####################################
# PHP Redis:
#####################################
# Install the php redis extension
RUN pecl install redis && docker-php-ext-enable redis
# Install PHP Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Remove Cache
RUN rm -rf /var/cache/apk/*
# Add UID '1000' to www-data
RUN usermod -u 1000 www-data
# Copy existing application directory permissions
COPY --chown=www-data:www-data . /var/www/html
# Change current user to www
# USER www-data
# Expose port 8000 and start php-fpm server
# EXPOSE 9000
CMD ["php-fpm"]