-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
78 lines (69 loc) · 2.91 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
#
# PHP-fpm container based on official PHP 7.3 image with additional extensions
# like zip, pdo_mysql, bcmath, oci8 and gd. Image is build for Laravel applications.
#
# OS: Debian 9 Streatch-slim
#
FROM php:7.4-fpm
#
#--------------------------------------------------------------------------
# General Updates
#--------------------------------------------------------------------------
#
# Update OS packages and install required ones.
RUN apt-get update && \
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 \
zip \
unzip \
build-essential \
libaio1 \
libzip-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm /var/log/lastlog /var/log/faillog
#
#--------------------------------------------------------------------------
# Application Dependencies
#--------------------------------------------------------------------------
#
# Download oracle packages and install OCI8
RUN curl -o instantclient-basic-linux.x64-19.6.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip \
&& unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip -d /usr/lib/oracle/ \
&& rm instantclient-basic-linux.x64-19.6.0.0.0dbru.zip \
&& curl -o instantclient-sdk-linux.x64-19.6.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-sdk-linux.x64-19.6.0.0.0dbru.zip \
&& unzip instantclient-sdk-linux.x64-19.6.0.0.0dbru.zip -d /usr/lib/oracle/ \
&& rm instantclient-sdk-linux.x64-19.6.0.0.0dbru.zip \
&& echo /usr/lib/oracle/instantclient_19_6 > /etc/ld.so.conf.d/oracle-instantclient.conf \
&& ldconfig
ENV LD_LIBRARY_PATH /usr/lib/oracle/instantclient_19_6
# Install PHP extensions: Laravel needs also zip, mysqli and bcmath which
# are not included in default image. Also install our compiled oci8 extensions.
RUN docker-php-ext-install zip pdo_mysql tokenizer bcmath opcache pcntl \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/instantclient_19_6 \
&& docker-php-ext-install -j$(nproc) oci8 \
# Install the PHP gd library
&& docker-php-ext-configure gd \
--with-jpeg=/usr/include/ \
--with-freetype=/usr/include/\
&& docker-php-ext-install gd
#
#--------------------------------------------------------------------------
# Final Touch
#--------------------------------------------------------------------------
#
# Copy our configs to the image.
COPY ./config/custom.ini /usr/local/etc/php/conf.d
COPY ./config/pool.d/custom.conf /usr/local/etc/php/conf.d
# Expose port 9000 and start php-fpm server
CMD ["php-fpm"]
EXPOSE 9000