Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
onresize committed Apr 11, 2024
1 parent 4e6b046 commit 319a6f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/技术总结/踩坑总结/docker入门.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,12 @@ server {
<img src="/AA_mdPics/dockhub.png">
</p>

代码示例:[react-ts-vite-admin](https://github.com/onresize/react-ts-vite-admin)
代码示例:[react-ts-vite-admin](https://github.com/onresize/react-ts-vite-admin)

- #### 发布到[github packages](https://github.com/features/packages)
- 先去设置github的token、在账户设置里面:『Github头像』->『Settings』->『Developer Settings』->『Personal access tokens』、选择 Tokens (classic)、至少勾选 `read:packages``write:packages` 权限
- `执行以下命令`
- 1.登入: `docker login ghcr.io -u github用户名 -p 刚才获取的token`
- 2.给镜像添加标签:`docker tag 镜像id ghcr.io/github用户名/镜像名:latest`、这里镜像id可以通过 `docker images` 查看
- 3.发布到github packages:`docker push ghcr.io/github用户名/镜像名:latest`、latest为最新版本、也可自行设置版本号
- 4.查看:访问 `https://github.com/github用户名?tab=packages`

0 comments on commit 319a6f8

Please sign in to comment.