Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qemu only : linux/arm/v7 'Command 'install' is not valid, try 'pecl help' #8

Open
ohnotnow opened this issue Sep 20, 2019 · 3 comments

Comments

@ohnotnow
Copy link

Resubmitting from docker-library/php#893 .

Slightly odd issue - if I try and build a multiarch image and use a pecl install redis as part of it - then it fails on the linux/arm/v7 build. Example Dockerfile :

FROM php:7.3-apache
RUN pecl install redis && docker-php-ext-enable redis

Running :

docker buildx build --pull --load --no-cache --platform linux/arm/v7 -t test-pecl -f Dockerfile .

Fails with

 => ERROR [2/2] RUN pecl install redis && docker-php-ext-enable redis      1.3s
------                                                                          
 > [2/2] RUN pecl install redis && docker-php-ext-enable redis:                 
#5 0.583 Command 'install' is not valid, try 'pecl help' 

Running :

docker buildx build --pull --load --no-cache --platform linux/amd64 -t test-pecl -f Dockerfile .

Works fine. The docker version in front of me is Docker version 19.03.2, build 6a30dfc. Let me know if there's any more info I can supply or something to dig into :-)

Oh - and running the php:7.3 image on an actual ARM machine also runs pecl install redis a-ok as noted on the original issue linked above.

@ohnotnow ohnotnow changed the title linux/arm/v7 'Command 'install' is not valid, try 'pecl help' Qemu only : linux/arm/v7 'Command 'install' is not valid, try 'pecl help' Sep 20, 2019
@StefanScherer
Copy link

Triaging this problem, I could reproduce the problem in

  • Docker Desktop 2.1.0.2 (Docker engine 19.03.2) on Mac (kernel 4.9.184-linuxkit)
  • a boot2docker 18.09.9 docker-machine in VirtualBox on the same Mac (kernel 4.19)
  • a VMware Fusion Vagrant ubuntu box (kernel 4.15.0)

Interesting, I could run the build on CircleCI (docker 17.09.0, kernel 4.15.0) https://circleci.com/gh/StefanScherer/circle2test/81?pipelines-ui-opt-out in a quick-and-dirty test environment.

In all non-DockerDesktop environments I used this image to register QEMU

docker run --rm --privileged hypriot/qemu-register

and this slightly adjusted Dockerfile to explicitly pull the ARM image for a "normal" docker build -t phptest ..

FROM arm32v7/php:7.3-apache
RUN pecl install redis && docker-php-ext-enable redis

TL;DR It doesn't work on my MacBook, but it works on CircleCI. Different host CPU? 🤔

@JnMik
Copy link

JnMik commented Jan 23, 2020

Same issue here running

yes | pecl install apcu

in this docker file

FROM biarms/qemu-bin as qemu-bin-ref
FROM arm32v7/php:7.3-fpm
COPY --from=qemu-bin-ref /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
RUN yes | pecl install apcu

Will fail in the build phase with the error mentioned above

Edit: Mine fails on gitlab pipeline running in docker:19.03.1-dind I believe

@JnMik
Copy link

JnMik commented Jan 23, 2020

Anyone found a workaround ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants