我想从以下位置构建 Docker 映像https://github.com/harvard-itsecurity/docker-misp使用 build.sh 文件。我传递了 --build-arg HTTP_PROXY 和 --build-arg HTTPS_PROXY,对于大多数 RUN 部分,它与 $HTTP_PROXY/$HTTPS_PROXY(git、wget、apt-update 等)配合使用。但对于
RUN
...
sudo -u www-data -H php composer.phar require kamisama/cake-resque:4.1.2 ; \
sudo -u www-data -H php composer.phar config vendor-dir Vendor ; \
sudo -u www-data -H php composer.phar install
代理环境变量不起作用。我处理了很多不同的选项,但总是出现 php 部分的错误。
Loading composer repositories with package information
Installation failed, reverting ./composer.json to its original content.
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
它似乎在先前下载的文件中加载外部文件,但无法处理提供的代理变量。
也许有人已经遇到过同样的问题并能发布更多帮助?