SkyAPM / SkyAPM-php-sdk

Replaced by https://github.com/apache/skywalking-php
https://skywalking.apache.org/
Apache License 2.0
421 stars 104 forks source link

Dockerfile 报错 #349

Closed cuifox closed 3 years ago

cuifox commented 3 years ago

Dockerfile FROM php:7.3-fpm-alpine

阿里云资源

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

复制源

COPY ./repositories /etc/apk/repositories

ENV GRPC_RELEASE_TAG master

ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib

ENV LIBRARY_PATH=$LIBRARY_PATH:/usr/local/protobuf/lib

ENV PATH=$PATH:/usr/local/protobuf/bin

ENV PKG_CONFIG_PATH=/usr/local/protobuf/lib/pkgconfig

RUN set -ex \ && apk add --update --no-cache autoconf make g++ git openssl wget gearmand gearman-dev hiredis protobuf protobuf-dev gprbuild grpc grpc-dev \

# installing skywalking

&& pecl install skywalking \ && docker-php-ext-enable skywalking \

&& pecl install redis \ && pecl install gearman \ && docker-php-ext-enable redis gearman \ && docker-php-ext-install pdo_mysql

RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

EXPOSE 9000

CMD ["php-fpm"]

报错误 fetch https://mirrors.ustc.edu.cn/alpine/edge/main/x86_64/APKINDEX.tar.gz fetch https://mirrors.ustc.edu.cn/alpine/edge/community/x86_64/APKINDEX.tar.gz fetch https://mirrors.ustc.edu.cn/alpine/edge/testing/x86_64/APKINDEX.tar.gz ERROR: unable to select packages: so:libgnarl-9.so (no such package): required by: gprbuild-2019-r0[so:libgnarl-9.so] so:libgnat-9.so (no such package): required by: gprbuild-2019-r0[so:libgnat-9.so]

bostin commented 3 years ago

用官方源吧

cuifox commented 3 years ago

发现skywalking和gearman有冲突

------------------ 原始邮件 ------------------ 发件人: "SkyAPM/SkyAPM-php-sdk" @.>; 发送时间: 2021年4月6日(星期二) 中午11:57 @.>; @.**@.>; 主题: Re: [SkyAPM/SkyAPM-php-sdk] Dockerfile 报错 (#349)

用官方源吧

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

heyanlong commented 3 years ago

冲突信息是什么?

bostin commented 3 years ago

@vallbuy 尝试下如下步骤:

  1. 先使用skywalking-php-sdk的官方dockerfile构建基础镜像: vallbuy/php:7.3-skywalking-0.0
  2. 然后使用如下Dockerfile
    
    FROM vallbuy/php:7.3-skywalking-0.0

RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ && echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ && echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories \ && apk update

RUN apk add gearman-dev gearman-libs gearmand \ && echo "extension=gearman.so" > /usr/local/etc/php/conf.d/ext-gearman.ini

cuifox commented 3 years ago

好的,多谢!

------------------ 原始邮件 ------------------ 发件人: "SkyAPM/SkyAPM-php-sdk" @.>; 发送时间: 2021年4月6日(星期二) 下午3:37 @.>; @.**@.>; 主题: Re: [SkyAPM/SkyAPM-php-sdk] Dockerfile 报错 (#349)

@vallbuy 尝试下如下步骤:

先使用skywalking-php-sdk的官方dockerfile构建基础镜像: vallbuy/php:7.3-skywalking-0.0

然后使用如下Dockerfile FROM vallbuy/php:7.3-skywalking-0.0 RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ && echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ && echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories \ && apk update RUN apk add gearman-dev gearman-libs gearmand \ && echo "extension=gearman.so" > /usr/local/etc/php/conf.d/ext-gearman.ini
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.