-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (59 loc) · 1.55 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM php:8.1-alpine3.15
# Add docker-php-extension-installer script
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Install dependencies
RUN apk add --no-cache \
bash \
curl \
freetype-dev \
g++ \
gcc \
git \
icu-dev \
icu-libs \
libc-dev \
libzip-dev \
make \
mysql-client \
nodejs \
npm \
oniguruma-dev \
yarn \
openssh-client \
postgresql-libs \
rsync \
zlib-dev
# Install php extensions
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions \
@composer \
redis-stable \
imagick-stable \
xdebug-stable \
bcmath \
calendar \
exif \
gd \
intl \
pdo_mysql \
pdo_pgsql \
pcntl \
soap \
zip \
pcov \
sodium
# Install prettier globally
RUN npm install -g prettier
# Add local and global vendor bin to PATH.
ENV PATH ./vendor/bin:/composer/vendor/bin:/root/.composer/vendor/bin:/usr/local/bin:$PATH
# Install PHP_CodeSniffer
RUN composer global require "squizlabs/php_codesniffer=*"
# Install PHP CS Fixer
RUN composer global require "friendsofphp/php-cs-fixer"
# Disable memory limit for PHP
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
# Set upload limit to 10MB
RUN echo upload_max_filesize = 10M >> /usr/local/etc/php/conf.d/docker-php-filesize-limit.ini;
RUN echo post_max_size = 10M >> /usr/local/etc/php/conf.d/docker-php-filesize-limit.ini;
# Setup working directory
WORKDIR /var/www