-1

I try to install php-xdebug in docker, but I got this error

#5 7.875   ERROR: unsatisfiable constraints:
#5 7.875   php5-xdebug-2.5.5-r0:
#5 7.875     masked in: cache
#5 7.875     satisfies:
#5 7.875                world[php5-xdebug><Q1Qep6HHzf56Q7ucrPzV1CAFSr+G8=]
#5 7.875   so:libc.musl-x86_64.so.1 (missing):
#5 7.875     required by:
#5 7.875                  php5-xdebug-2.5.5-r0[so:libc.musl-x86_64.so.1]

I used alpine:3.7 will Apple M1. How can I solve this problem?

Beginning of Docker file:

FROM alpine:3.7

# dependencies required for running "phpize"
ENV PHPIZE_DEPS \
  autoconf \
  g++ \
  make \
  zlib-dev 

...

wget -O /root/src/php5-xdebug-2.5.5-r0.apk https://github.com/sgerrand/alpine-pkg-php5-xdebug/releases/download/2.5.5-r0/php5-xdebug-2.5.5-r0.apk && \
  apk add --no-cache /root/src/php5-xdebug-2.5.5-r0.apk && \
  rm /root/src/php5-xdebug-2.5.5-r0.apk && \
Toraaa
  • 145
  • 2
  • 10
  • can you please provide a docker file and full alpine image name – Naor Tedgi Apr 01 '21 at 06:01
  • sorry, this is my company project's file, so I can't share all docker files. I shared the beginning. – Toraaa Apr 01 '21 at 06:06
  • Does this answer your question? [How do I install XDebug on docker's official php-fpm-alpine image?](https://stackoverflow.com/questions/46825502/how-do-i-install-xdebug-on-dockers-official-php-fpm-alpine-image) – LinPy Apr 01 '21 at 06:49
  • @LinPy Not yet. I got error `No releases available for package "pecl.php.net/xdebug"` after run command follow the URL – Toraaa Apr 01 '21 at 06:57
  • OK , then see the answer – LinPy Apr 01 '21 at 07:03

1 Answers1

0

you may use this :

FROM alpine:3.7
RUN apk update \
    && apk upgrade \
    && apk add --no-cache php7-pear php7-dev gcc musl-dev make
RUN pecl install xdebug-2.5.5
LinPy
  • 16,987
  • 4
  • 43
  • 57