forked from laradock/php-fpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (55 loc) · 1.94 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
#
#--------------------------------------------------------------------------
# Image Setup
#--------------------------------------------------------------------------
#
ARG MINOR_PHP_VERSION=8.0
ARG FULL_PHP_VERSION=8.0-fpm
FROM php:${FULL_PHP_VERSION}
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
ARG MINOR_PHP_VERSION=8.0
ARG FULL_PHP_VERSION=8.0-fpm
#
#--------------------------------------------------------------------------
# Software's Installation
#--------------------------------------------------------------------------
#
# Installing tools and PHP extentions using "apt", "docker-php", "pecl",
#
# Install "curl", "libmemcached-dev", "libpq-dev", "libjpeg-dev",
# "libpng-dev", "libfreetype6-dev", "libssl-dev", "libmcrypt-dev",
RUN set -eux; \
apt-get update -y; \
apt-get upgrade -y; \
apt-get install -y --no-install-recommends \
curl \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev;
RUN if [ $MINOR_PHP_VERSION = "7.4" ] || [ $MINOR_PHP_VERSION = "8.0" ] || [ $FULL_PHP_VERSION = "latest" ]; then \
apt-get install -y --no-install-recommends libonig-dev \
;fi
RUN rm -rf /var/lib/apt/lists/*
RUN set -eux; \
# Install the PHP pdo_mysql extention
docker-php-ext-install pdo_mysql; \
# Install the PHP pdo_pgsql extention
docker-php-ext-install pdo_pgsql && \
# Install the PHP gd library
if [ $MINOR_PHP_VERSION = "7.4" ] || [ $MINOR_PHP_VERSION = "8.0" ] || [ $FULL_PHP_VERSION = "latest" ]; then \
docker-php-ext-configure gd \
--prefix=/usr \
--with-jpeg \
--with-freetype; \
else \
docker-php-ext-configure gd \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2; \
fi && \
docker-php-ext-install gd;