docker-library / php

Docker Official Image packaging for PHP
https://php.net
MIT License
3.84k stars 2k forks source link

Can't rename the php.ini-development #1502

Closed cizordj closed 3 months ago

cizordj commented 8 months ago

I can't rename the file php.ini-development to php.ini on a fresh container.

2024-03-22_16-42

All of our images have the following command in their Dockerfiles and fail upon build.

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

My system info:

Debian bookworm (stable) 6.1.76-1
Linux 6.1.0-18-amd64
Docker version 26.0.0, build 2ae903e

I am using docker-ce from the official website

deb http://download.docker.com/linux/debian bookworm stable
tianon commented 8 months ago

I can't reproduce -- my best guess is that you need to update libseccomp2 and/or Docker and runc on your host. :see_no_evil:

$ docker run -it --rm --pull=always php:8.1-cli-alpine sh
8.1-cli-alpine: Pulling from library/php
Digest: sha256:daa8116f07820115b0b2fcd38aeb10d25cd7a1667cc1c279e2045fa4059e38d3
Status: Image is up to date for php:8.1-cli-alpine
/ # mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
/ # 
cizordj commented 8 months ago

My libseccomp2 is updated and I can't install runc because it removes my docker package.

I did the same command as you did.

% docker run -it --rm --pull=always php:8.1-cli-alpine sh

8.1-cli-alpine: Pulling from library/php
Digest: sha256:daa8116f07820115b0b2fcd38aeb10d25cd7a1667cc1c279e2045fa4059e38d3
Status: Image is up to date for php:8.1-cli-alpine
/ # mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
mv: can't rename '/usr/local/etc/php/php.ini-production': Invalid argument 

I am open for more suggestions 😄

joshtrichards commented 3 months ago

My libseccomp2 is updated and I can't install runc because it removes my docker package.

I cannot reproduce this problem either and I'm running running the same version of Debian as you.

runc is provided in the containerd.io package when using the official Docker package sources (as you seem to be - I am too, though at this point >26.0.0).

I don't think your problem is related to this image. Have you tried reproducing the problem in some other Docker images to see if it's environmental matter?

https://docs.docker.com/engine/install/debian/ https://docs.docker.com/engine/release-notes/27.1/

P.S. Might be something to take up over at https://forums.docker.com/

cizordj commented 3 months ago

I just tried again and it's no longer happening (I'm using Fedora).