【发布时间】:2022-01-06 19:04:41
【问题描述】:
我在 gitlab.com CI 中有一个使用 the php:8.0 image on dockerhub 的项目构建,我可以看到它是最新的 PHP 8.0.13。但是,当我的 CI 在 gitlab.com 上运行时,它使用的过时版本会破坏我的构建:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/event-dispatcher v6.0.0 -> satisfiable by symfony/event-dispatcher[v6.0.0].
- symfony/event-dispatcher v6.0.0 requires php >=8.0.2 -> your PHP version (8.0.1) does not satisfy that requirement.
您可以在这里看到它使用的是 PHP 8.0.1,而不是任何更新的版本。
我没有直接使用php:8.0 图像,而是通过使用php:8.0 图像作为其基本图像in its dockerfile 的edbizarro/gitlab-ci-pipeline-php 图像。我猜问题出在这里,因为这个包已经有一段时间没有更新了。
如何让 gitlab 使用更新版本的图像?
【问题讨论】:
-
能否请您发布有关工作的 gitlab-ci.yml 以便我们查看它是如何配置的?另外,您是否使用自托管运行器?
-
正如您所提到的,问题在于
edbizarro/gitlab-ci-pipeline-php尚未随着php:8.0中的上游更改而更新和重新发布。不幸的是,这个问题在构建该镜像后无法解决——镜像edbizarro/gitlab-ci-pipeline-php已经过时,必须更新。你不能以任何实际的方式处理事后的事......也许在你的工作中安装一个新版本的 PHP 内联(我怀疑这会很好用)?你只需要上游维护者来更新镜像——或者 fork 并自己更新并发布你自己的镜像。