forked from yeszao/dnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
7,803 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,31 @@ PHP_INSTALL_APPS=git,openssh | |
# ssh 映射目录, composer 私有包使用 [email protected] 则需要将 ~/.ssh/id_rsa 复制到 ./data/ssh/ 目录下。直接映射 ~/.ssh也可以。没有则请忽略 | ||
PHP_SSH_DIR=./data/ssh | ||
|
||
# PHP83 | ||
# | ||
# Available PHP_EXTENSIONS: | ||
# | ||
# pdo_mysql,zip,pcntl,mysqli,mbstring,exif,bcmath,calendar, | ||
# sockets,gettext,shmop,sysvmsg,sysvsem,sysvshm,pdo_rebird, | ||
# pdo_dblib,pdo_oci,pdo_odbc,pdo_pgsql,pgsql,oci8,odbc,dba, | ||
# gd,intl,bz2,soap,xsl,xmlrpc,wddx,curl,readline,snmp,pspell, | ||
# recode,tidy,gmp,imap,ldap,imagick,sqlsrv,mcrypt,opcache, | ||
# redis,memcached,xdebug,swoole,pdo_sqlsrv,sodium,yaf,mysql, | ||
# amqp,mongodb,event,rar,ast,yac,yar,yaconf,msgpack,igbinary, | ||
# seaslog,varnish,xhprof,xlswriter,memcache,rdkafka,zookeeper, | ||
# psr,phalcon,sdebug,ssh2,yaml,protobuf,hprose | ||
# | ||
# You can let it empty to avoid installing any extensions, | ||
# or install multi plugins as: | ||
# PHP_EXTENSIONS=pdo_mysql,mysqli,gd,curl,opcache | ||
# | ||
PHP83_VERSION=8.3 | ||
PHP83_PHP_CONF_FILE=./services/php83/php.ini | ||
PHP83_FPM_CONF_FILE=./services/php83/php-fpm.conf | ||
PHP83_LOG_DIR=./logs/php83 | ||
PHP83_EXTENSIONS=pdo_mysql,mysqli,mbstring,gd,curl,opcache,pdo_pgsql,zip,bcmath,mbstring,redis,mcrypt,xdebug | ||
PHP83_CRONTABS=./crontabs/php83 | ||
|
||
# PHP82 | ||
# | ||
# Available PHP_EXTENSIONS: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
ARG PHP_VERSION | ||
FROM surnet/alpine-wkhtmltopdf:3.19.1-0.12.6-full as wkhtmltopdf | ||
FROM ${PHP_VERSION} | ||
|
||
ARG TZ | ||
ARG PHP_EXTENSIONS | ||
ARG CONTAINER_PACKAGE_URL | ||
ARG COMPOSER_URL | ||
|
||
RUN if [ "${CONTAINER_PACKAGE_URL}" != "" ] ; then sed -i "s/dl-cdn.alpinelinux.org/${CONTAINER_PACKAGE_URL}/g" /etc/apk/repositories ; fi | ||
|
||
COPY ./extensions /tmp/extensions | ||
WORKDIR /tmp/extensions | ||
|
||
RUN chmod +x install.sh \ | ||
&& sh install.sh \ | ||
&& rm -rf /tmp/extensions | ||
|
||
ADD ./extensions/install-php-extensions /usr/local/bin/ | ||
|
||
RUN chmod uga+x /usr/local/bin/install-php-extensions | ||
|
||
RUN apk --no-cache add tzdata \ | ||
# 下面这部分是 wkhtmltopdf 需要的依赖 | ||
libstdc++ \ | ||
libx11 \ | ||
libxrender \ | ||
libxext \ | ||
libssl3 \ | ||
ca-certificates \ | ||
fontconfig \ | ||
freetype \ | ||
ttf-droid \ | ||
ttf-freefont \ | ||
ttf-liberation \ | ||
# ttf-dejavu \ # 中文字体,但还是使用下面 front/* 的中文字体 | ||
# && rm -rf /var/cache/apk/* \ | ||
# 上面这部分是 wkhtmltopdf 需要的依赖 | ||
libreoffice \ | ||
mysql-client \ | ||
&& cp "/usr/share/zoneinfo/$TZ" /etc/localtime \ | ||
&& echo "$TZ" > /etc/timezone | ||
|
||
|
||
# Fix: https://github.com/docker-library/php/issues/240 | ||
RUN apk add gnu-libiconv libstdc++ --no-cache --repository http://${CONTAINER_PACKAGE_URL}/alpine/edge/community/ --allow-untrusted | ||
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php | ||
|
||
|
||
# Install composer and change it's cache home | ||
RUN curl -o /usr/bin/composer https://${COMPOSER_URL}/composer/composer.phar \ | ||
&& chmod +x /usr/bin/composer | ||
ENV COMPOSER_HOME=/tmp/composer | ||
|
||
# php image's www-data user uid & gid are 82, change them to 1000 (primary user) | ||
RUN apk --no-cache add shadow && usermod -u 1000 www-data && groupmod -g 1000 www-data | ||
|
||
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/libwkhtmltox.so /bin/ | ||
|
||
WORKDIR /www |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.