-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
130 lines (114 loc) · 4.37 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
121
122
123
124
125
126
127
128
129
130
FROM php:8.0-fpm
LABEL maintainer="Vincent Faliès <[email protected]>"
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libbz2-dev \
libcurl4-gnutls-dev \
libxml2-dev \
libenchant-dev \
libssl-dev \
libc-client-dev \
libkrb5-dev \
zlib1g-dev \
libicu-dev \
g++ \
git \
libsqlite3-dev \
libpspell-dev \
libreadline-dev \
libedit-dev \
librecode-dev \
libsnmp-dev \
libsnmp30 \
libtidy-dev \
libxslt1.1 \
libxslt1-dev \
mailutils \
msmtp \
msmtp-mta \
snmp \
libgmp-dev \
libldb-dev \
libldap2-dev \
libsodium-dev \
libzip-dev \
gnupg2 \
wget \
unzip \
librabbitmq-dev \
inetutils-ping \
libaio1 \
libonig-dev \
libpq-dev
RUN PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install -j$(nproc) imap \
&& docker-php-ext-configure intl \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap
RUN docker-php-ext-install -j$(nproc) bcmath bz2 calendar dba enchant exif ffi fileinfo filter ftp gd gettext gmp intl ldap \
mysqli opcache pcntl pdo_mysql pdo_pgsql pgsql pspell shmop snmp soap sockets \
sysvmsg sysvsem sysvshm tidy xsl zend_test zip
RUN apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# set up sendmail config
ADD conf/msmtprc /etc/msmtprc
# The above 'maildev' is the name you used for the link command
# in your docker-compose file or docker link command.
# Docker automatically adds that name in the hosts file
# of the container you're linking MailDev to.
# Set up php sendmail config
RUN echo "sendmail_path=sendmail -i -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
# Fully qualified domain name configuration for sendmail on localhost.
# Without this sendmail will not work.
# This must match the value for 'hostname' field that you set in ssmtp.conf.
RUN echo "localhost localhost.localdomain" >> /etc/hosts
# Set up XDebug
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
# Install MongoDB extension
RUN yes | pecl install mongodb \
&& echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongo.ini
# Install AMQP extension
# RUN pecl install amqp && docker-php-ext-enable amqp
# Composer installation
ADD scripts/composer.sh /tmp/composer.sh
RUN chmod +x /tmp/composer.sh \
&& sync \
&& /tmp/composer.sh \
&& mv composer.phar /usr/local/bin/composer
# User creation
RUN useradd -U -m -r -o -u 1003 vfac
# Install fixuid
RUN USER=vfac && \
GROUP=vfac && \
curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.5/fixuid-0.5-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \
chown root:root /usr/local/bin/fixuid && \
chmod 4755 /usr/local/bin/fixuid && \
mkdir -p /etc/fixuid && \
printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml
ENTRYPOINT ["fixuid", "-q"]
# OCI installation
RUN mkdir -p /opt/oracle
WORKDIR /opt/oracle
RUN wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basic-linux.x64-19.3.0.0.0dbru.zip \
&& wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip \
&& unzip instantclient-basic-linux.x64-19.3.0.0.0dbru.zip \
&& unzip instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip \
&& rm instantclient-basic-linux.x64-19.3.0.0.0dbru.zip \
&& rm instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip \
&& echo /opt/oracle/instantclient_19_3 > /etc/ld.so.conf.d/oracle-instantclient.conf \
&& ldconfig \
&& echo "instantclient,/opt/oracle/instantclient_19_3" | pecl install oci8 \
&& echo "extension=oci8.so" >> /usr/local/etc/php/conf.d/oci8.ini
WORKDIR /var/www/html
CMD ["/usr/local/sbin/php-fpm"]
USER vfac:vfac
RUN composer config --global repo.packagist composer https://packagist.org