Skip to main content

此版本的 GitHub Enterprise Server 已于以下日期停止服务 2024-07-09. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Migrating your enterprise to the Container registry from the Docker registry

You can migrate Docker images previously stored in the Docker registry on 你的 GitHub Enterprise Server 实例 to the Container registry.

谁可以使用此功能?

Enterprise owners can migrate Docker images to the Container registry.

注意:GitHub Enterprise Server 的 Container registry 当前为 beta 版本,可能会有变化。

必须启用 GitHub Packages 和子域隔离才能使用 Container registry。 有关详细信息,请参阅“使用容器注册表”。

About the Container registry

Container registry 将容器映像存储在组织或个人帐户中,并允许你将映像与存储库相关联。 可以选择是从存储库继承权限,还是独立于存储库设置精细权限。 你也可以匿名访问公共容器映像。 For more information, see "使用容器注册表."

For more information about configuring GitHub Packages for 你的 GitHub Enterprise Server 实例, see "企业 GitHub Packages 使用入门."

About migration from the Docker registry

Container registry 替代 GitHub 的 Docker 注册表。 If the Docker registry on 你的 GitHub Enterprise Server 实例 contains images, you must manually migrate the images to the Container registry.

Note: GitHub Enterprise Server 3.6 支持迁移存储在组织中的 Docker 映像。 未来的版本将支持迁移用户拥有的映像。

任何使用 Docker 注册表 docker.HOSTNAME 的命名空间的脚本或 GitHub Actions 工作流在迁移到 containers.HOSTNAME 处的 Container registry 后都将继续工作。 For more information about the impact of migration to the Container registry, see "从 Docker 注册表迁移到容器注册表."

Migrating organizations to the Container registry

You can start a migration of all your organizations' Docker images to the Container registry. The duration of the migration operation depends on the total number of images to migrate, and the overall load on your instance. After a successful migration, GitHub Enterprise Server will display a summary, and all future uploads of Docker images will use the Container registry.

If a site administrator has configured email notifications for 你的 GitHub Enterprise Server 实例, you will receive an email after the migration is complete. For more information, see "配置电子邮件通知."

Notes:

  • During the migration, the CPU and memory usage for your instance will increase. To ensure the performance of the instance for your users, GitHub recommends that you begin a migration during a period of reduced activity.
  • During the migration, do not modify settings for your enterprise or run ghe-config-apply from an administrative SSH session. These actions will trigger a configuration run, which can restart services and may interrupt the migration.
  • After the migration, storage pressure on your instance will increase due to the duplication of image files in the Docker registry and the Container registry. A future release of GitHub Enterprise Server will remove the duplicated files when all migrations are complete.

For more information about monitoring the performance and storage of 你的 GitHub Enterprise Server 实例, see "访问监视仪表板."

  1. 在 GitHub Enterprise Server 的右上角,单击你的个人资料照片,然后单击“企业设置”****。

    单击 GitHub Enterprise Server 上的个人资料照片时显示的下拉菜单的屏幕截图。 “企业设置”选项以深橙色边框突出显示。

  2. 在页面左侧的企业帐户边栏中,单击 设置”。

  3. In the left sidebar, click Packages.

  4. To the right of the number of packages to migrate, click Start migration. During the migration, GitHub Enterprise Server will display progress on this page.

After the migration completes, the page will display the results. If a migration fails, the page will show the organizations that own the package that caused the failure.

Re-running a failed organization migration

Prior to migration, if a user has created a package in the Container registry that has an identical name to an existing package in the Docker registry, the migration will fail.

  1. Delete the affected container in the Container registry. For more information, see "删除和恢复包."

  2. 在 GitHub Enterprise Server 的右上角,单击你的个人资料照片,然后单击“企业设置”****。

    单击 GitHub Enterprise Server 上的个人资料照片时显示的下拉菜单的屏幕截图。 “企业设置”选项以深橙色边框突出显示。

  3. 在页面左侧的企业帐户边栏中,单击 设置”。

  4. 在左侧边栏中,单击“包”。

  5. To the right of the number of packages to migrate, click Re-run migration. During the migration, GitHub Enterprise Server will display progress on this page.

  6. If the migration fails again, start from step 1 and re-run the migration.