前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >alpine系统php8的dockerfile

alpine系统php8的dockerfile

作者头像
美团骑手
发布2022-01-13 09:24:09
75014
发布2022-01-13 09:24:09
举报
文章被收录于专栏:技术进阶

markdown有点问题""解析不出来,需要修改一下哈~

代码语言:javascript
复制
FROM alpine:latest

MAINTAINER  zhaohao731869706@163.com

ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8

RUN set -ex 
    && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories 
    && apk update 
    && apk upgrade 
    && apk add --no-cache 
        gcc 
        g++ 
        libffi-dev 
        openssl 
        openssl-dev 
        libtool 
        libc-dev 
        make 
        autoconf 
        libevent 
        zip 
        unzip 
        curl 
        wget 
        librdkafka 
        librdkafka-dev 
        php8 
        php8-dev 
        php8-apcu 
        php8-pecl-amqp 
        php8-bcmath 
        php8-ctype 
        php8-curl 
        php8-calendar 
        php8-exif 
        php8-pecl-event 
        php8-fileinfo 
        php8-ftp 
        php8-gd 
        php8-gettext 
        php8-iconv 
        php8-pecl-igbinary 
        php8-intl 
        php8-imap 
        php8-pecl-imagick 
        php8-json 
        php8-ldap 
        php8-mbstring 
        php8-pecl-msgpack 
        php8-mysqli 
        php8-mysqlnd 
        php8-mongodb 
        php8-pecl-memcached 
        php8-opcache 
        php8-openssl 
        php8-pcntl 
        php8-pdo 
        php8-pdo_mysql 
        php8-pdo_sqlite 
        php8-phar 
        php8-posix 
        php8-pecl-protobuf 
        php8-redis 
        php8-pecl-rdkafka 
        php8-session 
        php8-shmop 
        php8-sockets 
        php8-sqlite3 
        php8-simplexml 
        php8-sysvshm 
        php8-pecl-mcrypt 
        php8-dom 
        php8-redis 
        php8-tokenizer 
        php8-xml 
        php8-xmlreader 
        php8-xmlwriter 
        php8-xsl 
        php8-zip 
    && ln -s /usr/bin/php8  /usr/bin/php 
    && ln -s /usr/bin/php-config8  /usr/bin/php-config 
    && ln -s /usr/bin/phpize8  /usr/bin/phpize 
    && wget http://pear.php.net/go-pear.phar 
    && php go-pear.phar 
    && pecl channel-update pecl.php.net 
    && yes|pecl install swoole 
    && echo "extension=swoole.so" > /etc/php8/conf.d/99-swoole.ini 
    && echo "swoole.use_shortname=off" >> /etc/php8/conf.d/99-swoole.ini 
    && sed -i -e 's@upload_max_filesize = 2M@upload_max_filesize = 128M@g' /etc/php8/php.ini 
    && sed -i -e 's@post_max_size = 8M@post_max_size = 128M@g' /etc/php8/php.ini 
    && sed -i -e 's@memory_limit = 128M@memory_limit = 1G@g' /etc/php8/php.ini 
    && echo "opcache.enable=1" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.enable_cli=1" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.memory_consumption=200" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.max_wasted_percentage=5" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.save_comments=1" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.interned_strings_buffer=8" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.max_accelerated_files=100000" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.fast_shutdown=1" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.revalidate_freq=120" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit=1205" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_buffer_size=128M" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_prof_threshold=0.005" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_root_traces=1024" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_side_traces=128" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_exit_counters=8192" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_hot_loop=64" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_hot_func=127" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_hot_return=8" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_hot_side_exit=8" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_blacklist_root_trace=16" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_blacklist_side_trace=8" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_loop_unrolls=8" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_recursive_calls=2" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_recursive_returns=2" >> /etc/php8/conf.d/00_opcache.ini 
    && echo "opcache.jit_max_polymorphic_calls=2" >> /etc/php8/conf.d/00_opcache.ini 
    && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer 
    && composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ 
    && rm -rf /var/cache/apk/* /tmp/* /usr/share/man /go-pear.phar

EXPOSE 9501

CMD ["php", "-a"]
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-01-11 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档