Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

php-fpm.conf is missing #19

Open
sacesare opened this issue Jun 15, 2018 · 7 comments
Open

php-fpm.conf is missing #19

sacesare opened this issue Jun 15, 2018 · 7 comments

Comments

@sacesare
Copy link

After install of any extension like "php7.1-pdo_pgsql", docker delete /etc/php/7.1/*.conf files, so fpm not work anymore.

Sample Dockerfile:
FROM phpearth/php:7.1-nginx
RUN apk add --no-cache php7.1-pdo_pgsql

Docker version: 18.03.1.ce-1.el7.centos
Linux: centos 7

@petk
Copy link
Member

petk commented Jun 15, 2018

Hello, thanks for reporting this issue.

I've just did the following and it seems to work ok:

mkdir test-project && cd test-project
echo "FROM phpearth/php:7.1-nginx\nRUN apk add --no-cache php7.1-pdo_pgsql" > Dockerfile
docker build -t test/project -f Dockerfile .
docker run -it --rm -p 8080:80 --name my_project_container test/project
# in a new terminal
docker exec -it my_project_container sh
ls /etc/php/7.1

and everything is there. Yes?

@sacesare
Copy link
Author

Version of docker and host?
It's working for me on docker 17.09.0-ce too, maybe /var/lib/docker corrupted?

@petk
Copy link
Member

petk commented Jun 16, 2018

  • Docker version 18.05.0-ce, build f150324
  • Ubuntu 18.04 with 4.15.0-23-generic kernel

@insekticid
Copy link

@sacesare I think that you have mounted directory /etc/php/7.1/ from your filesystem. double check this!
I made that same mistake some time before too

@sacesare
Copy link
Author

sacesare commented Jun 17, 2018

Thank you,guys, it seems docker storage issue anyway. I've to check it on another docker version and machine.
@insekticid I've tested my container same way as Peter suggested with same outcome, so it's not "-v" option.
Anyway, if I install something else , not php7.1-* php earth package, everything is ok.

@sacesare
Copy link
Author

sacesare commented Jun 19, 2018

Interesting observation, if I run "apk add --no-cache php7.1-*" inside of running base image:
docker run --rm -it --entrypoint=sh phpearth/php:7.1-nginx
everything is ok- /etc/php/7.1 stays intact. But "docker build" with same "apk add..." command simple replace base image's /etc/php/7.1 directory, destroying base content.

@adaliszk
Copy link

@sacesare Weird, I'm using the apk repo on top of alpine and I haven't seen this issue, if I install something the files stay the same default, I can copy them out modify and add them again (switching FPM socket mode for example).

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

No branches or pull requests

4 participants