-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 1.32 KB
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 1.32 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
FROM php:7.4.30-apache
LABEL org.opencontainers.image.source https://github.com/didilesmana/php74-apache-docker
# Download installer php extentions | Thanks to https://github.com/mlocati
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Install php extentions
RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions http bcmath bz2 calendar \
exif gd gettext gmp igbinary msgpack mysqli \
pcntl pgsql redis shmop sockets sqlsrv sysvmsg \
sysvsem sysvshm xsl zip pdo_mysql pdo_pgsql pdo_sqlsrv
# Config timezone server GMT+7 WIB
ENV CONTAINER_TIMEZONE="Asia/Jakarta"
RUN rm -f /etc/localtime \
&& ln -s /usr/share/zoneinfo/${CONTAINER_TIMEZONE} /etc/localtime
# Config limit file upload
RUN echo "post_max_size=20M" >> $PHP_INI_DIR/conf.d/memory-limit.ini
RUN echo "upload_max_filesize=20M" >> $PHP_INI_DIR/conf.d/memory-limit.ini
# Config timezone php GMT+7 WIB
RUN echo "date.timezone=Asia/Jakarta" > $PHP_INI_DIR/conf.d/date_timezone.ini
# Display errors in stderr
RUN echo "display_errors=stderr" > $PHP_INI_DIR/conf.d/display-errors.ini
# Disable PathInfo
RUN echo "cgi.fix_pathinfo=0" > $PHP_INI_DIR/conf.d/path-info.ini
# Disable expose PHP
RUN echo "expose_php=0" > $PHP_INI_DIR/conf.d/path-info.ini
EXPOSE 80