美文网首页K8s
docker php7.4镜像

docker php7.4镜像

作者: 王宣成 | 来源:发表于2022-06-20 16:14 被阅读0次

    Dockerfile文件

    FROM php:7.4-fpm
    
    #Download PHP extensions
    #ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
    #RUN chmod uga+x /usr/local/bin/install-php-extensions && sync
    
    COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
    
    RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
        && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
          curl \
          git  \
          zip unzip \
        && install-php-extensions \
          bcmath \
          bz2 \
          calendar \
          exif \
          gd \
          intl \
          ldap \
          memcached \
          mysqli \
          opcache \
          pdo_mysql \
          pdo_pgsql \
          pgsql \
          redis \
          soap \
          xsl \
          zip \
          sockets \
          swoole \
          yaf \
          memcached \
          mongodb \
          mcrypt \
          iconv \
          mbstring
    RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
        && ln -s $(composer config --global home) /root/composer
    ENV PATH=$PATH:/root/composer/vendor/bin COMPOSER_ALLOW_SUPERUSER=1
    
    docker build -t php:74 .
    

    相关文章

      网友评论

        本文标题:docker php7.4镜像

        本文链接:https://www.haomeiwen.com/subject/yrejvrtx.html