mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 19:36:36 +08:00
Make GHCR the default image source
This commit is contained in:
@@ -124,25 +124,27 @@ http://服务器IP:18080
|
||||
|
||||
| 来源 | 镜像地址 | 适合场景 |
|
||||
| --- | --- | --- |
|
||||
| Docker Hub | `shukbet/mediastationgo:latest` | 最常用,直接 `docker compose pull` |
|
||||
| GitHub 仓库镜像 GHCR | `ghcr.io/shukebta/mediastation-go:latest` | Docker Hub 拉取慢或不可用时备用 |
|
||||
| GitHub 仓库镜像 GHCR | `ghcr.io/shukebta/mediastation-go:latest` | 默认推荐,跟随仓库发布 |
|
||||
| Docker Hub | `shukbet/mediastationgo:latest` | 备用镜像,GHCR 拉取慢或不可用时使用 |
|
||||
|
||||
如果想固定版本,推荐使用 Docker Hub 已发布版本标签,例如:
|
||||
如果想固定版本,请先到仓库 Packages 页面确认 GHCR 是否有对应标签。写法如下:
|
||||
|
||||
```yaml
|
||||
image: shukbet/mediastationgo:MediaStationGo-v0.0.72
|
||||
image: ghcr.io/shukebta/mediastation-go:<版本标签>
|
||||
# GHCR 没有对应标签时,可以用 Docker Hub 备用:
|
||||
# image: shukbet/mediastationgo:MediaStationGo-v0.0.72
|
||||
```
|
||||
|
||||
GHCR 固定版本请以仓库 Packages 页面已发布的标签为准;如果只想简单部署,直接使用 `latest` 即可。
|
||||
如果只想简单部署,直接使用 GHCR 的 `latest` 即可。
|
||||
|
||||
手动拉取示例:
|
||||
|
||||
```bash
|
||||
# Docker Hub
|
||||
docker pull shukbet/mediastationgo:latest
|
||||
|
||||
# GitHub 仓库镜像
|
||||
docker pull ghcr.io/shukebta/mediastation-go:latest
|
||||
|
||||
# Docker Hub 备用
|
||||
docker pull shukbet/mediastationgo:latest
|
||||
```
|
||||
|
||||
你只需要重点看 `volumes` 这一段:
|
||||
@@ -201,10 +203,10 @@ environment:
|
||||
services:
|
||||
mediastation-go:
|
||||
# 镜像二选一:
|
||||
# Docker Hub:
|
||||
image: shukbet/mediastationgo:latest
|
||||
# GitHub 仓库镜像 GHCR:
|
||||
# image: ghcr.io/shukebta/mediastation-go:latest
|
||||
image: ghcr.io/shukebta/mediastation-go:latest
|
||||
# Docker Hub 备用:
|
||||
# image: shukbet/mediastationgo:latest
|
||||
|
||||
container_name: mediastation-go
|
||||
restart: unless-stopped
|
||||
|
||||
+13
-11
@@ -124,25 +124,27 @@ Both image sources are supported. Pick one and put it in `image:`:
|
||||
|
||||
| Source | Image | Best for |
|
||||
| --- | --- | --- |
|
||||
| Docker Hub | `shukbet/mediastationgo:latest` | Most common deployments, simple `docker compose pull` |
|
||||
| GitHub Container Registry (GHCR) | `ghcr.io/shukebta/mediastation-go:latest` | Backup source when Docker Hub is slow or unavailable |
|
||||
| GitHub Container Registry (GHCR) | `ghcr.io/shukebta/mediastation-go:latest` | Recommended default, follows repository releases |
|
||||
| Docker Hub | `shukbet/mediastationgo:latest` | Backup source when GHCR is slow or unavailable |
|
||||
|
||||
To pin a version, use a published Docker Hub version tag:
|
||||
To pin a version, first confirm the tag exists on the repository Packages page. Use this format:
|
||||
|
||||
```yaml
|
||||
image: shukbet/mediastationgo:MediaStationGo-v0.0.72
|
||||
image: ghcr.io/shukebta/mediastation-go:<version-tag>
|
||||
# If GHCR does not have that tag, use Docker Hub as the backup:
|
||||
# image: shukbet/mediastationgo:MediaStationGo-v0.0.72
|
||||
```
|
||||
|
||||
For pinned GHCR versions, use the tags published on the repository Packages page. For the simplest setup, keep `latest`.
|
||||
For the simplest setup, keep GHCR `latest`.
|
||||
|
||||
Manual pull examples:
|
||||
|
||||
```bash
|
||||
# Docker Hub
|
||||
docker pull shukbet/mediastationgo:latest
|
||||
|
||||
# GitHub Container Registry
|
||||
docker pull ghcr.io/shukebta/mediastation-go:latest
|
||||
|
||||
# Docker Hub backup
|
||||
docker pull shukbet/mediastationgo:latest
|
||||
```
|
||||
|
||||
Focus on this part:
|
||||
@@ -201,10 +203,10 @@ The root `docker-compose.yml` follows this style:
|
||||
services:
|
||||
mediastation-go:
|
||||
# Pick one image source:
|
||||
# Docker Hub:
|
||||
image: shukbet/mediastationgo:latest
|
||||
# GitHub Container Registry (GHCR):
|
||||
# image: ghcr.io/shukebta/mediastation-go:latest
|
||||
image: ghcr.io/shukebta/mediastation-go:latest
|
||||
# Docker Hub backup:
|
||||
# image: shukbet/mediastationgo:latest
|
||||
|
||||
container_name: mediastation-go
|
||||
restart: unless-stopped
|
||||
|
||||
+4
-4
@@ -17,10 +17,10 @@
|
||||
services:
|
||||
mediastation-go:
|
||||
# 镜像二选一:
|
||||
# 方式一:Docker Hub(默认,推荐)
|
||||
image: shukbet/mediastationgo:latest
|
||||
# 方式二:GitHub 仓库镜像 GHCR(Docker Hub 拉取慢或不可用时使用)
|
||||
# image: ghcr.io/shukebta/mediastation-go:latest
|
||||
# 方式一:GitHub 仓库镜像 GHCR(默认,推荐)
|
||||
image: ghcr.io/shukebta/mediastation-go:latest
|
||||
# 方式二:Docker Hub 备用(GHCR 拉取慢或不可用时使用)
|
||||
# image: shukbet/mediastationgo:latest
|
||||
|
||||
container_name: mediastation-go
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user