Code Monkey home page Code Monkey logo

Comments (5)

heyanlong avatar heyanlong commented on August 25, 2024

意见已采纳

from skyapm-php-sdk.

sinbad01234 avatar sinbad01234 commented on August 25, 2024

FROM php:7.2-fpm
MAINTAINER sinbad "sinbad"
ENV REFRESHED_AT 2019-04-21 10:10:10
ENV INSTALL_LIB_DEP="wget zip unzip"
RUN apt-get update
RUN apt-get install -y $INSTALL_LIB_DEP
RUN apt-get install -y -q git rake ruby-ronn zlib1g-dev libcurl4-openssl-dev && apt-get clean

RUN cd /usr/local/bin && curl -sS https://getcomposer.org/installer | php
RUN cd /usr/local/bin && mv composer.phar composer

RUN pecl install grpc

#install protoc
RUN mkdir -p /tmp/protoc &&
curl -L https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip > /tmp/protoc/protoc.zip &&
cd /tmp/protoc &&
unzip protoc.zip &&
cp /tmp/protoc/bin/protoc /usr/local/bin &&
cd /tmp &&
rm -r /tmp/protoc &&
docker-php-ext-enable grpc

RUN set -ex
&& cd /opt
&& wget https://github.com/SkyAPM/SkyAPM-php-sdk/archive/master.zip -O SkyAPM.zip
&& unzip SkyAPM.zip
&& cd SkyAPM-php-sdk-master
&& phpize
&& ./configure
&& make && make install
&& wget https://github.com/SkyAPM/SkyAPM-php-sdk/releases/download/3.1.2/sky_php_agent_linux_x64
&& mv sky_php_agent_linux_x64 report_client
&& chmod +x report_client
&& cp report_client /usr/bin/

RUN apt-get install libssl-dev -y
&& rm -rf /tmp/pear

RUN apt-get update -y &&
apt-get install -y libmcrypt-dev &&
pecl install mcrypt-1.0.1 &&
docker-php-ext-enable mcrypt

RUN set -ex
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
&& docker-php-ext-install -j$(nproc) gd
&& docker-php-ext-install mysqli
&& docker-php-ext-install zip
&& docker-php-ext-install pdo
&& docker-php-ext-install pdo_mysql
&& docker-php-ext-install opcache

RUN apt-get remove -y $INSTALL_LIB_DEP && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install sockets
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
WORKDIR /code
RUN chmod 777 /code
RUN chmod 777 /usr/bin/report_client
RUN usermod -u 1000 www-data
CMD ["php-fpm"]

from skyapm-php-sdk.

sinbad01234 avatar sinbad01234 commented on August 25, 2024

建议 建立一个基于 alpine-nginx-php7 的docker image,可以向java 版学习
把镜像FROM 改成这个 alpine-nginx-php7 试下,我用的是php:7.2-fpm

from skyapm-php-sdk.

heyanlong avatar heyanlong commented on August 25, 2024

from skyapm-php-sdk.

DavenAaron avatar DavenAaron commented on August 25, 2024

三楼 dockerfile 应该是存在问题的
FROM php:7.2-fpm 为zts版本的php-fpm

from skyapm-php-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.