-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
frankenphp.Dockerfile
51 lines (40 loc) · 1.22 KB
/
frankenphp.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
FROM dunglas/frankenphp
# Update the image and install dependencies
RUN apt update \
&& apt upgrade -y \
&& apt install cron libnss3-tools -y \
&& apt clean
# Update the CA roots
RUN curl -s -O https://curl.haxx.se/ca/cacert.pem && mv cacert.pem /usr/local/share/ca-certificates \
&& update-ca-certificates
# Install the MySQLi PHP extension
RUN install-php-extensions \
bcmath \
gmp \
intl \
mysqli \
opcache \
pdo_mysql \
redis \
zip
# Copy the custom php.ini file
COPY assets/php.ini /usr/local/etc/php/php.ini
# Copy the application files
COPY . /app/public
VOLUME /app/public
# Add a user for Apache
RUN useradd panopticon
ENV PANOPTICON_DB_HOST="mysql"
ENV PANOPTICON_DB_PREFIX="pnptc_"
ENV MYSQL_DATABASE="panopticon"
ENV MYSQL_USER="panopticon"
ENV MYSQL_PASSWORD="Emx6Rf9mtneXNgpZyehvdm8NUJJMJQA8"
ENV ADMIN_USERNAME="admin"
ENV ADMIN_PASSWORD="admin"
ENV ADMIN_NAME="Super Administrator"
ENV ADMIN_EMAIL="[email protected]"
# Copy the custom entrypoint file and tell Docker to use it
COPY assets/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
# File permissions
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["bash", "/usr/local/bin/docker-entrypoint.sh"]