This repository was archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (42 loc) · 1.51 KB
/
Dockerfile
File metadata and controls
53 lines (42 loc) · 1.51 KB
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
FROM php:8.0.8-apache
# Install php modules and git
RUN apt-get update && apt-get install -y \
freetds-dev \
libicu-dev \
libpq-dev \
libmcrypt-dev \
libxml2-dev \
git \
default-mysql-client \
zlib1g-dev \
libzip-dev \
redis-tools \
&& rm -r /var/lib/apt/lists/* \
&& cp -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/ \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-install \
mysqli \
pdo_dblib \
pdo_mysql \
soap \
zip \
opcache
# Install redis extension for PHP
RUN mkdir -p cd /usr/src/php/ext \
&& cd /usr/src/php/ext \
&& git clone -b master --single-branch https://github.com/phpredis/phpredis.git \
&& cd phpredis \
&& phpize && ./configure && make && make install \
&& touch /usr/local/etc/php/conf.d/redis.ini && echo extension=redis.so > /usr/local/etc/php/conf.d/redis.ini
RUN a2enmod rewrite remoteip
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > /usr/local/bin/wp && chmod +x /usr/local/bin/wp
RUN apt-get -y clean \
&& apt-get -y autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/*
ENV SITEPATH=/var/www/html
COPY docker-init.sh /usr/local/bin/
COPY remoteip.conf /etc/apache2/mods-enabled
RUN chmod +x /usr/local/bin/docker-init.sh
CMD /usr/local/bin/docker-init.sh