docker-php
发表日期:2021-07-26 23:29:19 | 来源: | | 浏览(788) 分类:docker
FROM centos:latest MAINTAINER anyehk@163.com RUN yum install -y gcc gcc-c++ glibc make openssl-devel RUN yum install -y nginx RUN yum install -y php php-devel php-gd php-json php-mbstring php-mysqlnd php-odbc php-opcache php-pdo php-pear php-pecl-zip php-soap php-xml RUN pecl install redis && echo 'extension=redis' >> /etc/php.d/20-redis.ini RUN mkdir /run/php-fpm/ RUN echo '<?php phpinfo();?>' >> /usr/share/nginx/html/index.php ADD nginx.conf /etc/nginx/nginx.conf # 安装MSSQL驱动 # https://docs.microsoft.com/zh-cn/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15 RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo \ && ACCEPT_EULA=Y yum install -y msodbcsql17 \ && ACCEPT_EULA=Y yum install -y mssql-tools \ && ACCEPT_EULA=Y yum install -y unixODBC-devel \ && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \ && source ~/.bashrc # 安装php-sqlserver扩展 http://pecl.php.net/package-search.php?pkg_name=sqlsrv RUN pecl install http://pecl.php.net/get/sqlsrv-5.6.0.tgz && echo 'extension=sqlsrv' >> /etc/php.d/20-sqlsrv.ini RUN pecl install http://pecl.php.net/get/pdo_sqlsrv-5.6.0.tgz && echo 'extension=pdo_sqlsrv' >> /etc/php.d/30-pdo_sqlsrv.ini RUN yum install -y epel-release RUN yum install -y supervisor ADD supervisord.conf /etc/supervisord.conf ADD supervisord.d /etc/supervisord.d/ EXPOSE 80 443 9001 ADD entrypoint.sh /etc/entrypoint.sh RUN chmod 755 /etc/entrypoint.sh ENTRYPOINT ["/etc/entrypoint.sh"] # ENTRYPOINT ["supervisord","-c","/etc/supervisord.conf"]