mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-20 17:12:25 +00:00 
			
		
		
		
	This PR cleans up the docs in a way to make them simpler to ingest by our [docs repo](https://gitea.com/gitea/gitea-docusaurus). 1. It includes all of the sed invocations our ingestion did, removing the need to do it at build time. 2. It replaces the shortcode variable replacement method with `@variable@` style, simply for easier sed invocations when required. 3. It removes unused files and moves the docs up a level as cleanup. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com>
		
			
				
	
	
	
	
		
			2.1 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.1 KiB
		
	
	
	
	
	
	
	
| date | title | slug | sidebar_position | draft | toc | menu | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021-07-20T00:00:00+00:00 | 容器注册表 | container | 30 | false | false | 
 | 
容器注册表
为您的用户或组织发布符合 Open Container Initiative(OCI) 规范的镜像。 该容器注册表遵循 OCI 规范,并支持所有兼容的镜像类型,如 Docker 和 Helm Charts。
目录
要使用容器注册表,您可以使用适用于特定镜像类型的工具。
以下示例使用 docker 客户端。
登录容器注册表
要推送镜像或者如果镜像位于私有注册表中,您需要进行身份验证:
docker login gitea.example.com
如果您使用的是 2FA 或 OAuth,请使用个人访问令牌替代密码进行身份验证。
镜像命名约定
镜像必须遵循以下命名约定:
{registry}/{owner}/{image}
例如,以下是所有者为 testuser 的有效镜像名称示例:
gitea.example.com/testuser/myimage
gitea.example.com/testuser/my-image
gitea.example.com/testuser/my/image
注意: 该注册表仅支持大小写不敏感的标签名称。因此,image:tag 和 image:Tag 将被视为相同的镜像和标签。
推送镜像
通过执行以下命令来推送镜像:
docker push gitea.example.com/{owner}/{image}:{tag}
| 参数 | 描述 | 
|---|---|
| owner | 镜像的所有者 | 
| image | 镜像的名称 | 
| tag | 镜像的标签 | 
例如:
docker push gitea.example.com/testuser/myimage:latest
拉取镜像
通过执行以下命令来拉取镜像:
docker pull gitea.example.com/{owner}/{image}:{tag}
| Parameter | Description | 
|---|---|
| owner | 镜像的所有者 | 
| image | 镜像的名称 | 
| tag | 镜像的标签 | 
例如:
docker pull gitea.example.com/testuser/myimage:latest