-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·53 lines (42 loc) · 1.16 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
FROM php:8.0-fpm
WORKDIR /var/www/app/
ENV ACCEPT_EULA=Y
ENV TZ=America/Recife
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
apt-utils \
libpng-dev \
libicu-dev \
libonig-dev \
libxml2-dev \
libtool \
libcurl4-openssl-dev \
libzip-dev \
libxml2-dev \
gnupg \
apt-transport-https \
git \
nginx \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN docker-php-ext-install \
intl \
mbstring \
exif \
pcntl \
bcmath \
gd \
mysqli \
pdo \
pdo_mysql \
xml \
curl \
zip
COPY --from=composer:2.5.5 /usr/bin/composer /usr/bin/composer
RUN openssl req -subj '/CN=localhost' -x509 -newkey rsa:4096 -nodes -keyout /etc/nginx/conf.d/key.pem -out /etc/nginx/conf.d/cert.pem -days 365
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./DockerConfig/nginx/default.conf /etc/nginx/sites-enabled/default
COPY ./DockerConfig/entrypoint.sh /etc/entrypoint.sh
RUN sed -i 's/access.log = \/proc\/self\/fd\/2/access.log = \/dev\/null/g' /usr/local/etc/php-fpm.d/docker.conf
EXPOSE 80
RUN chmod +x /etc/entrypoint.sh
ENTRYPOINT ["/etc/entrypoint.sh"]