我在哪里可以找到 github action 与预装软件一起使用的 docker 镜像

问题描述

我在 Github Actions 中使用自托管运行器而不是 Github 运行器,因为自托管运行器可以访问私有网络。我还将在自托管运行器之上使用容器。

来自链接 https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners

可以将 runs-on 设置为 ubuntu-latest。我认为这与 docker pull ubuntu 的图像相同,预装软件位于 https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md

但是 docker hub 上的 ubuntu 镜像与 Github 托管的运行器使用的 ubuntu-latest 镜像不同。哪里可以找到 Github runner 使用的 docker 镜像?

在配置自托管运行器并安装 docker 引擎后,我尝试了以下工作流程。但是它失败了,没有图像 ubuntu-latest

jobs:
  build:
    runs-on: self-hosted
    container:
      image: ubuntu-latest
    steps:
      - run: echo "? The job was automatically triggered by a ${{ github.event_name }} event."
      - run: echo "? This job is now running on a ${{ runner.os }} server !"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)