-
Notifications
You must be signed in to change notification settings - Fork 0
/
PHP-Packages
65 lines (44 loc) · 1.47 KB
/
PHP-Packages
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
FROM php:7.2.2-apache
COPY ./mydirectory/ /var/www/html
RUN apt-get update && \
apt-get -yq install \
build-essential \
vim \
unzip \
wget \
zip
RUN apt-get update -y && \
apt-get install -y libcap2-bin && \
setcap 'cap_net_bind_service=+ep' /usr/sbin/apache2 && \
getcap /usr/sbin/apache2
USER www-data
EXPOSE 8080
HEALTHCHECK CMD curl --fail http://18.224.155.155:8080/ || exit 1
/> docker run -d -p 8080:80 <img>
https://github.com/bufferapp/dockerfiles/tree/master/apache-php
====================================================================================
FROM php:7.2.2-apache
COPY index.php /var/www/html/
RUN docker-php-ext-install mysqli && \
docker-php-ext-install pdo_mysql
RUN apt-get update && apt-get install -y \
vim \
wget \
unzip \
git \
RUN { \
# Zend OPcache
echo "opcache.enable=1"; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.interned_strings_buffer=16'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.memory_consumption=256'; \
echo 'opcache.revalidate_freq=0'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
RUN apt-get update -y
RUN apt-get install -y libcap2-bin
#command to set user non root
RUN setcap 'cap_net_bind_service=+ep' /usr/sbin/apache2
RUN getcap /usr/sbin/apache2
USER www-data