-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (45 loc) · 1.55 KB
/
Dockerfile
File metadata and controls
54 lines (45 loc) · 1.55 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
53
54
ARG PHP_VERSION
FROM php:${PHP_VERSION}-cli-bookworm
ENV XDEBUG_MODE=coverage
RUN echo "memory_limit=-1" > "$PHP_INI_DIR/conf.d/memory-limit.ini" \
&& echo "date.timezone=${PHP_TIMEZONE:-UTC}" > "$PHP_INI_DIR/conf.d/date_timezone.ini"
ARG PHP_VERSION
RUN apt-get update \
&& apt install -y \
curl \
git \
zip \
unzip \
openssl \
libzip-dev \
ispell \
iamerican \
irussian \
hunspell \
hunspell-en-us \
hunspell-ru \
aspell \
aspell-en \
aspell-ru \
libpspell-dev
RUN pecl channel-update pecl.php.net && \
pecl install xdebug-3.5.1 && \
docker-php-ext-enable xdebug
RUN if [ "${PHP_VERSION}" = "8.2" ] || [ "${PHP_VERSION}" = "8.3" ]; then \
docker-php-ext-configure pspell && \
docker-php-ext-install pspell; \
else \
pecl install pspell; \
fi && \
docker-php-ext-enable pspell && \
rm -r /var/lib/apt/lists/*
RUN cp /usr/share/hunspell/en_US.aff /usr/share/hunspell/en_US.aff.orig \
&& cp /usr/share/hunspell/en_US.dic /usr/share/hunspell/en_US.dic.orig \
&& iconv --from ISO8859-1 -t ascii//TRANSLIT /usr/share/hunspell/en_US.aff.orig > /usr/share/hunspell/en_US.aff \
&& iconv --from ISO8859-1 -t ascii//TRANSLIT /usr/share/hunspell/en_US.dic.orig > /usr/share/hunspell/en_US.dic \
&& head /usr/share/hunspell/en_US.aff \
&& sed -i '/SET ISO8859-1/c\SET UTF-8' /usr/share/hunspell/en_US.aff
# install composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
WORKDIR /usr/src/myapp