-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
71 lines (57 loc) · 1.95 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
FROM devilbox/php-fpm-8.0:latest
LABEL maintainer="Victor Ferreira <[email protected]>"
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
#
#--------------------------------------------------------------------------
# Software's Installation
#--------------------------------------------------------------------------
#
# Installing tools and PHP extentions
RUN set -eux; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y --no-install-recommends \
apt-utils \
curl \
libbz2-dev \
libtidy-dev \
libxslt-dev \
libldap2-dev \
libsqlite3-dev \
libsqlite3-0 \
libc-client-dev \
libkrb5-dev \
libpq-dev \
libjpeg-dev libpng-dev libfreetype6-dev jpegoptim optipng pngquant gifsicle ffmpeg \
libmagickwand-dev imagemagick \
libzip-dev zip unzip && \
rm -rf /var/lib/apt/lists/*
RUN set -eux; \
docker-php-ext-configure intl && \
docker-php-ext-configure gd --with-jpeg --with-freetype && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install -j$(nproc) \
bcmath bz2 exif gd gettext imap intl ldap mysqli opcache \
pdo_mysql pdo_sqlite pdo_pgsql pgsql soap sockets tidy xsl zip
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
#--------------------------------------------------------------------------
# Final Touch
#--------------------------------------------------------------------------
USER root
# Clean up
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm /var/log/lastlog /var/log/faillog
WORKDIR /var/www
# Configure non-root user.
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN groupmod -o -g ${PGID} www-data && \
usermod -o -u ${PUID} -g www-data www-data && \
chown -R www-data:www-data /var/www
CMD ["php-fpm"]
EXPOSE 9000