-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
89 lines (84 loc) · 2.94 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
FROM dockette/alpine:3.19
LABEL maintainer="Milan Sulc <sulcmil@gmail.com>"
ADD conf/php.ini /etc/php81/conf.d/999-php.ini
ENV PHP_DIR=/usr/bin
ENV PHP_BIN=$PHP_DIR/php
ENV PHP8_BIN=$PHP_DIR/php81
ENV PHPXD_BIN=$PHP_DIR/phpxd
ENV COMPOSER_DIR=/usr/bin/
ENV COMPOSER_BIN=$COMPOSER_DIR/composer
ENV TZ=Europe/Prague
ENV LD_PRELOAD="/usr/lib/preloadable_libiconv.so php"
RUN echo '@community http://dl-cdn.alpinelinux.org/alpine/v3.19/community/' >> /etc/apk/repositories && \
# DEPENDENCIES #############################################################
apk update && \
apk upgrade && \
apk --no-cache add \
bash \
git \
ca-certificates \
curl \
openssh \
tzdata \
make \
direnv \
gnu-libiconv@community && \
# PHP ######################################################################
apk --no-cache add \
php81-bcmath@community \
php81-bz2@community \
php81-calendar@community \
php81-cgi@community \
php81-ctype@community \
php81-curl@community \
php81-dom@community \
php81-exif@community \
php81-fileinfo@community \
php81-gd@community \
php81-gettext@community \
php81-iconv@community \
php81-imap@community \
php81-intl@community \
php81-ldap@community \
php81-mbstring@community \
php81-mysqli@community \
php81-mysqlnd@community \
php81-openssl@community \
php81-pcntl@community \
php81-pdo_mysql@community \
php81-pdo_pgsql@community \
php81-pdo_sqlite@community \
php81-pdo@community \
php81-pecl-apcu@community \
php81-pecl-imagick@community \
php81-pecl-mailparse@community \
php81-pecl-memcache@community \
php81-pecl-memcached@community \
php81-pgsql@community \
php81-phar@community \
php81-posix@community \
php81-redis@community \
php81-session@community \
php81-simplexml@community \
php81-soap@community \
php81-sodium@community \
php81-sqlite3@community \
php81-tokenizer@community \
php81-xdebug@community \
php81-xml@community \
php81-xmlreader@community \
php81-xmlwriter@community \
php81-xsl@community \
php81-zip@community \
php81-zlib@community \
php81@community \
&& \
sed -i -- 's/zend/;zend/g' /etc/php81/conf.d/50_xdebug.ini && \
echo "php -dzend_extension=xdebug.so \$@" >> $PHPXD_BIN && \
chmod +x $PHPXD_BIN && \
ln -s $PHP8_BIN $PHP_BIN && \
# COMPOSER #################################################################
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --2 && \
# CLEAN UP #################################################################
rm -rf /var/cache/apk/* /tmp/*
CMD ["php"]