kaisawind's blog
  • 关于
  • 所有帖子

github docker packages使用 - Mon, Jul 13, 2020

github docker packages使用

1. 概述

github推出了packages管理,到目前为止包含以下几种: docker,Maven,NuGet,npm,RubyGems

2. 包管理

2.1 申请私有权限(token)

https://github.com/settings/tokens

  • delete:packages
  • read:packages
  • write:packages
  • repo

注意 repo权限只有是私有项目时才需要

2.2 登录docker

其中.github是写有申请token的文件

cat ~/.github | docker login docker.pkg.github.com -u kaisawind --password-stdin

2.3 tag镜像

对镜像的命名有严格的要求

docker tag IMAGE_ID docker.pkg.github.com/{username}/{repository-name}/IMAGE_NAME:VERSION

2.4 push镜像

docker push docker.pkg.github.com/{username}/{repository-name}/IMAGE_NAME:VERSION

3. 其他

在首页包列表中能找到docker镜像

发布页面中能够找到docker镜像

对docker镜像进行管理

删除docker镜像比较深,比较难找


辽ICP备2021007608号 | © 2025 | kaisawind

Facebook Twitter GitHub