generated from linkorb/.github
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.php8
84 lines (71 loc) · 2.53 KB
/
Dockerfile.php8
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
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM php:8.3-apache
EXPOSE 80
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
ENV APACHE_SERVER_NAME php-docker-base-linkorb
COPY ./php.ini-production "$PHP_INI_DIR/php.ini"
COPY ./apache2.conf /etc/apache2/apache2.conf
COPY ./apache-vhost.conf /etc/apache2/sites-available/000-default.conf
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
curl \
git \
gosu \
iputils-ping \
joe \
jq \
libbz2-dev \
openssh-client \
software-properties-common \
telnet \
unzip \
vim \
zip \
ca-certificates \
gnupg \
tidy \
wkhtmltopdf \
pdftk \
libxml2-dev \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_MAJOR=20
# Based on nodesource installation instructions https://github.com/nodesource/distributions#installation-instructions
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install nodejs -y \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg \
| gpg --dearmor >> /usr/share/keyrings/yarnkey.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install yarn \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install bz2 \
&& install-php-extensions apcu gd gmp intl opcache pdo_mysql pdo_pgsql sockets zip imap mailparse soap mysqli bcmath \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/config/secrets/dev \
&& mkdir -p /app/public/build \
&& chown -R www-data:www-data /app \
&& chown -R www-data:www-data /var/www \
&& a2enmod rewrite \
&& a2enmod headers
COPY --chown=www-data:www-data index.html /app
WORKDIR /app
USER root