Make GHCR the default image source

This commit is contained in:
ShukeBta
2026-06-13 23:44:39 +08:00
parent a15ef68387
commit 22b76c5e1d
3 changed files with 30 additions and 26 deletions
+13 -11
View File
@@ -124,25 +124,27 @@ http://服务器IP:18080
| 来源 | 镜像地址 | 适合场景 | | 来源 | 镜像地址 | 适合场景 |
| --- | --- | --- | | --- | --- | --- |
| Docker Hub | `shukbet/mediastationgo:latest` | 最常用,直接 `docker compose pull` | | GitHub 仓库镜像 GHCR | `ghcr.io/shukebta/mediastation-go:latest` | 默认推荐,跟随仓库发布 |
| GitHub 仓库镜像 GHCR | `ghcr.io/shukebta/mediastation-go:latest` | Docker Hub 拉取慢或不可用时备用 | | Docker Hub | `shukbet/mediastationgo:latest` | 备用镜像,GHCR 拉取慢或不可用时使用 |
如果想固定版本,推荐使用 Docker Hub 已发布版本标签,例如: 如果想固定版本,请先到仓库 Packages 页面确认 GHCR 是否有对应标签。写法如下:
```yaml ```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 ```bash
# Docker Hub
docker pull shukbet/mediastationgo:latest
# GitHub 仓库镜像 # GitHub 仓库镜像
docker pull ghcr.io/shukebta/mediastation-go:latest docker pull ghcr.io/shukebta/mediastation-go:latest
# Docker Hub 备用
docker pull shukbet/mediastationgo:latest
``` ```
你只需要重点看 `volumes` 这一段: 你只需要重点看 `volumes` 这一段:
@@ -201,10 +203,10 @@ environment:
services: services:
mediastation-go: mediastation-go:
# 镜像二选一: # 镜像二选一:
# Docker Hub:
image: shukbet/mediastationgo:latest
# GitHub 仓库镜像 GHCR: # 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 container_name: mediastation-go
restart: unless-stopped restart: unless-stopped
+13 -11
View File
@@ -124,25 +124,27 @@ Both image sources are supported. Pick one and put it in `image:`:
| Source | Image | Best for | | 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` | Recommended default, follows repository releases |
| GitHub Container Registry (GHCR) | `ghcr.io/shukebta/mediastation-go:latest` | Backup source when Docker Hub is slow or unavailable | | 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 ```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: Manual pull examples:
```bash ```bash
# Docker Hub
docker pull shukbet/mediastationgo:latest
# GitHub Container Registry # GitHub Container Registry
docker pull ghcr.io/shukebta/mediastation-go:latest docker pull ghcr.io/shukebta/mediastation-go:latest
# Docker Hub backup
docker pull shukbet/mediastationgo:latest
``` ```
Focus on this part: Focus on this part:
@@ -201,10 +203,10 @@ The root `docker-compose.yml` follows this style:
services: services:
mediastation-go: mediastation-go:
# Pick one image source: # Pick one image source:
# Docker Hub:
image: shukbet/mediastationgo:latest
# GitHub Container Registry (GHCR): # 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 container_name: mediastation-go
restart: unless-stopped restart: unless-stopped
+4 -4
View File
@@ -17,10 +17,10 @@
services: services:
mediastation-go: mediastation-go:
# 镜像二选一: # 镜像二选一:
# 方式一:Docker Hub(默认,推荐) # 方式一:GitHub 仓库镜像 GHCR(默认,推荐)
image: shukbet/mediastationgo:latest image: ghcr.io/shukebta/mediastation-go:latest
# 方式二:GitHub 仓库镜像 GHCR(Docker Hub 拉取慢或不可用时使用) # 方式二:Docker Hub 备用(GHCR 拉取慢或不可用时使用)
# image: ghcr.io/shukebta/mediastation-go:latest # image: shukbet/mediastationgo:latest
container_name: mediastation-go container_name: mediastation-go
restart: unless-stopped restart: unless-stopped