Answer the question
In order to leave comments, you need to log in
Why can't composer download packages when building a docker container?
I can not determine what exactly is the matter, but it feels like a problem on the part of PHP.
There is a docker container with php7.2.27-alpine, in which PHP-FPM and PHP-CLI are built at the same time, and the docker is immediately loaded there.
All packages are downloaded and installed, including composer (which is downloaded by curl). But when it comes to installing packages by the composer itself, everything falls off on a timeout. The composer cannot download the file ( https://repo.packagist.org). Dancing with a tambourine around the composer has no effect, not specifying DNS through docker, not specifying DNS through /etc/resolv.conf
The only way to force the composer to load packages is to specify ip repo.packagist.org in /etc/hosts, then the composer picks up and downloads everything. At the same time, everything is perfectly downloaded with curl and wget without editing hosts.
Those. Most likely it's in PHP, but I can't figure out what it is.
What settings should I look to fix this behavior?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question