-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
89 lines (75 loc) · 1.71 KB
/
Dockerfile
File metadata and controls
89 lines (75 loc) · 1.71 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
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
FROM php:8.1-alpine
LABEL maintainer "Franck DAKIA <dakiafranck@gmail.com>"
# Install dev dependencies
RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
curl-dev \
imagemagick-dev \
libtool \
libxml2-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 \
yarn \
openssh-client \
rsync \
zlib-dev
# Install PECL and PEAR extensions
RUN pecl install \
imagick \
xdebug
# Enable PECL and PEAR extensions
RUN docker-php-ext-enable \
imagick \
xdebug
# Configure php extensions
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure zip --with-libzip
# 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 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
EXPOSE 80
HEALTHCHECK --interval=1m CMD curl -f http://localhost:80 || exit 1
CMD php /var/www/bow run:server --port=80 --host=0.0.0.0