-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
91 lines (79 loc) · 1.68 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Source: https://github.com/lorisleiva/laravel-docker
# Updates: workdir is /var/www/app instead of /var/www
FROM php:7.4-alpine
# Install dev dependencies
RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
curl-dev \
imagemagick-dev \
libtool \
libxml2-dev \
postgresql-dev \
sqlite-dev
# Install production dependencies
RUN apk add --no-cache \
bash \
curl \
freetype-dev \
g++ \
gcc \
git \
icu-dev \
icu-libs \
imagemagick \
libc-dev \
libjpeg-turbo-dev \
libpng-dev \
libzip-dev \
make \
mysql-client \
nodejs \
nodejs-npm \
oniguruma-dev \
yarn \
openssh-client \
postgresql-libs \
rsync \
zlib-dev
# Install PECL and PEAR extensions
RUN pecl install \
redis \
imagick \
xdebug
# Enable PECL and PEAR extensions
RUN docker-php-ext-enable \
redis \
imagick \
xdebug
# Configure php extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
# Install php extensions
RUN docker-php-ext-install \
bcmath \
calendar \
curl \
exif \
gd \
iconv \
intl \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pdo_sqlite \
pcntl \
tokenizer \
xml \
zip
# Install composer
ENV COMPOSER_HOME /composer
ENV PATH ./vendor/bin:/composer/vendor/bin:$PATH
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
# Install PHP_CodeSniffer
RUN composer global require "squizlabs/php_codesniffer=*"
# Cleanup dev dependencies
RUN apk del -f .build-deps
# Setup working directory
WORKDIR /var/www/app
CMD composer install