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

Error on automation with Docker Hub but not when running manually #378

Closed
if-kenn opened this issue Jul 2, 2021 · 13 comments
Closed

Error on automation with Docker Hub but not when running manually #378

if-kenn opened this issue Jul 2, 2021 · 13 comments

Comments

@if-kenn
Copy link

if-kenn commented Jul 2, 2021

I have an automated build for when new versions of PHP come out. It is based on the php:7.4-fpm-alpine image which currently uses Alpine 3.14.0 and PHP 7.4.21. Here is my Dockerfile.

On our automated build, it appears that igbinary having an issue:

running: make -j2
/bin/sh /tmp/pear/temp/pear-build-defaultusericJmFk/igbinary-3.2.3/libtool --mode=compile cc -g -O2 -O2 -Wall -Wpointer-arith -Wcast-align -Wwrite-strings -Wswitch -finline-limit=10000 --param large-function-growth=10000 --param inline-unit-growth=10000 -I. -I/tmp/pear/temp/igbinary -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultusericJmFk/igbinary-3.2.3/include -I/tmp/pear/temp/pear-build-defaultusericJmFk/igbinary-3.2.3/main -I/tmp/pear/temp/igbinary -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/igbinary/src/php7/igbinary.c -o src/php7/igbinary.lo
make: /bin/sh: Operation not permitted
make: *** [Makefile:192: src/php7/igbinary.lo] Error 127
ERROR: `make -j2' failed

As I said, this is not happening when running manually.

Do you think that Docker Hub could be caching an old image or Github version of docker-php-extension-installer?

From the build.log it does look like it is using docker-php-extension-installer v.1.2.39.

@mlocati
Copy link
Owner

mlocati commented Jul 4, 2021

I can't replicate this issue. Also the tests executed by GitHub Actions work without issues.

Did you try to re-build your docker image? Maybe it was a transient issue? Without being able to reproduce it, I can't understand what may be going wrong.

@doanbaanh
Copy link

I have same problem when build on docker hub:

make: /bin/sh: Operation not permitted
make: *** [Makefile:192: amqp.lo] Error 127
ERROR: 'make -j2' failed

My Dockerfile:

FROM php:7.4-fpm-alpine

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN apk update && apk --no-cache --virtual add \
		git \
		grep \
		supervisor \
	&& rm /var/cache/apk/* \
	&& chmod +x /usr/local/bin/install-php-extensions \
	&& sync \
	&& install-php-extensions \
		@composer \
		amqp \
		apcu \
		bcmath \
		exif \
		gd \
		imagick \
		intl \
		mcrypt \
		mongodb \
		opcache \
		pdo_mysql \
		pdo_pgsql \
		redis \
		sockets \
		zip \
	&& cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \
	&& sed -i "s/^;\?date\.timezone =.*/date\.timezone = Europe\/Moscow/" /usr/local/etc/php/php.ini

Issue replicate only on docker hub (local build work fine) for php/7.4-fpm-alpine and php/8.0-fpm-alpine images. Build caching disabled. Any ideas?

@mlocati
Copy link
Owner

mlocati commented Jul 5, 2021

It seems a docker hub issue: https://forums.docker.com/t/multiple-projects-stopped-building-on-docker-hub-operation-not-permitted/92570

There's really nothing I can do

@if-kenn
Copy link
Author

if-kenn commented Jul 5, 2021

So this sounds like it is a coreutils/host kernel problem. Unfortunately this is happening with the blessed version of PHP 7.4 on Alpine, php:7.4-fpm-alpine, which is heavily in use.

@if-kenn
Copy link
Author

if-kenn commented Jul 5, 2021

@mlocati Thanks for pointing me in the right direction, I pinned to php:7.4-fpm-alpine3.12 and it just built fine.

@doanbaanh You might want to adjust your Dockerfile to pin as well.

@hexus
Copy link

hexus commented Jul 13, 2021

Same issue in GitLab CI. There's something funky about these newer versions of Alpine.

Edit: php:7.4-fpm-alpine3.13 works fine too 👍

@if-kenn
Copy link
Author

if-kenn commented Jul 13, 2021

@hexus I don't think it is with Alpine, but as @mlocati mentioned a change with the the Docker host'. From what I can gather, it is a coreutils is being updated, the Docker host has an old kernel that is not compatible.

@hexus
Copy link

hexus commented Jul 13, 2021

Really strange that this has been noticed since April/May last year but it's only affecting these images now, though. 🤔

Either way, it sounds like GitLab needs to sort this out too. I indeed could build these images locally but see the same error in GitLab CI pipelines run in the shared GitLab runners.

@mlocati
Copy link
Owner

mlocati commented Jul 13, 2021

Not so strange: only alpine 3.14 seems to be affected (maybe because it's using the coreutils version that's incompatible with the Docker Hub build systems)

@mlocati
Copy link
Owner

mlocati commented Jul 13, 2021

And the Alpine 3.14 PHP images are made available since docker-library/php#1166

@hexus
Copy link

hexus commented Jul 13, 2021

Ah right, I thought they would have been using 3.14 sooner than a month ago. Fair enough. 👍

@mlocati
Copy link
Owner

mlocati commented Aug 28, 2021

I'm closing this issue, since it's related to the statx-related features introduced in the coreutils version available in Alpine Linux 3.14 (and probably in Debian 11 - Bullseye), which don't work if the host machine is running an old kernel version.
That's unrelated to this docker-php-extension-installer project, and there's nothing we can do about that in the install-php-extensions script.

@michaelKaefer
Copy link

It is working again in Alpine 3.15. In my Dockerfile I replaced this:

# We use alpine 3.13 because there is a bug on installing PHP extensions on 3.14
# See https://github.com/mlocati/docker-php-extension-installer/issues/378
FROM php:8-fpm-alpine3.13 as php-fpm

with:

FROM php:8.1-fpm-alpine as php-fpm

This would not have worked with 3.14 but on 3.15 it is working again.

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

5 participants