-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (43 loc) · 1.15 KB
/
Copy pathDockerfile
File metadata and controls
52 lines (43 loc) · 1.15 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM php:8.0-alpine
RUN apk add --no-cache openrc linux-headers
# PHP dependencies
RUN apk update && apk add --no-cache ${PHPIZE_DEPS} \
bash\
curl-dev \
libpng-dev \
libxml2-dev \
oniguruma-dev \
icu-dev
RUN docker-php-ext-install \
pdo \
pdo_mysql \
mysqli \
curl \
gd \
simplexml \
xml \
mbstring \
dom \
intl \
ctype \
tokenizer \
xmlwriter \
openssl
# Xdebug
RUN pecl install xdebug && docker-php-ext-enable xdebug
# docker-php-ext-extensions
RUN curl -sSLf \
-o /usr/local/bin/install-php-extensions \
https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
chmod +x /usr/local/bin/install-php-extensions
# Composer
RUN install-php-extensions @composer
# Apache 2
RUN apk add --no-cache apache2
RUN rc-update add apache2
COPY .docker/apache2.conf /etc/apache2/httpd.conf
COPY .docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
COPY . /var/www/localhost/htdocs
WORKDIR /var/www/localhost/htdocs
ENTRYPOINT [ "sh", "/usr/local/bin/docker-entrypoint.sh" ]