-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
88 lines (83 loc) · 2.88 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
FROM dockette/alpine:3.15
LABEL maintainer="Milan Sulc <sulcmil@gmail.com>"
ADD conf/php.ini /etc/php80/conf.d/999-php.ini
ENV PHP_DIR=/usr/bin
ENV PHP_BIN=$PHP_DIR/php
ENV PHP8_BIN=$PHP_DIR/php8
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.15/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 \
php8@community \
php8-pecl-apcu@community \
php8-bcmath@community \
php8-bz2@community \
php8-calendar@community \
php8-cgi@community \
php8-ctype@community \
php8-curl@community \
php8-dom@community \
php8-exif@community \
php8-fileinfo@community \
php8-gd@community \
php8-gettext@community \
php8-iconv@community \
php8-pecl-imagick@community \
php8-imap@community \
php8-intl@community \
php8-ldap@community \
php8-mbstring@community \
php8-pecl-mcrypt@community \
php8-pecl-memcache@community \
php8-pecl-memcached@community \
php8-mysqli@community \
php8-mysqlnd@community \
php8-openssl@community \
php8-pcntl@community \
php8-pdo_mysql@community \
php8-pdo_pgsql@community \
php8-pdo_sqlite@community \
php8-pdo@community \
php8-pgsql@community \
php8-phar@community \
php8-posix@community \
php8-redis@community \
php8-session@community \
php8-simplexml@community \
php8-soap@community \
php8-sodium@community \
php8-sqlite3@community \
php8-tokenizer@community \
php8-xdebug@community \
php8-xml@community \
php8-xmlreader@community \
php8-xmlwriter@community \
php8-xsl@community \
php8-zip@community \
php8-zlib@community && \
sed -i -- 's/zend/;zend/g' /etc/php8/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"]