Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
full-statck-skills avatar

Docker Hub

  • 10 installs
  • 2 repo stars
  • Updated July 29, 2026
  • full-statck-skills/docker-skills

Publish, pull, and tag Docker images and manage Docker Hub or private registries like Harbor, including mirrors and content trust.

About

Guides publishing and pulling Docker images and managing registries including Docker Hub, private registries, and Harbor. A developer uses it to manage container images and tags in a registry.

  • docker login/tag/push/pull workflow and tag management strategies
  • Private registry setup with Docker Registry and Harbor, mirrors, and content trust

Docker Hub by the numbers

  • 10 all-time installs (skills.sh)
  • Ranked #1,007 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/full-statck-skills/docker-skills --skill docker-hub

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs10
repo stars2
Last updatedJuly 29, 2026
Repositoryfull-statck-skills/docker-skills

What it does

Publish, pull, and tag Docker images and manage Docker Hub or private registries like Harbor, including mirrors and content trust.

Files

SKILL.mdMarkdownGitHub ↗

Docker Hub — 镜像仓库管理

Guidance for publishing, pulling, and managing Docker images.

When to Use

ALWAYS use this skill when the user mentions:

  • "docker hub", "docker registry", "镜像仓库"
  • "docker push", "docker pull", "docker tag"
  • "私有仓库", "private registry", "Harbor"
  • "镜像加速", "registry mirror"
  • "docker login", "authentication"

Core Workflow

# Login
docker login
docker login registry.example.com   # Private registry

# Tag
docker tag myapp:latest myuser/myapp:v1.0.0
docker tag myapp:latest myuser/myapp:latest

# Push
docker push myuser/myapp:v1.0.0
docker push myuser/myapp:latest

# Pull
docker pull myuser/myapp:v1.0.0
docker pull myuser/myapp:latest

Tag Strategy

TagPurposeRetention
v1.2.3Exact release (semver)Forever
v1.2Minor version latestUntil next minor
v1Major version latestUntil next major
latestLatest build (dev only!)Rolling
sha256-abc123Digest pinAs needed
Production: NEVER use :latest. Always pin exact version or digest.
Development: :latest is OK for convenience.

Private Registry

Docker Registry (Official)

docker run -d -p 5000:5000 --name registry \
  -v registry:/var/lib/registry \
  registry:2
docker tag myapp localhost:5000/myapp:v1
docker push localhost:5000/myapp:v1

Harbor (Enterprise)

# Download and run
wget https://github.com/goharbor/harbor/releases/download/v2.10.0/harbor-offline-installer-v2.10.0.tgz
tar xzf harbor-offline-installer-v2.10.0.tgz
cd harbor
cp harbor.yml.tmpl harbor.yml
# Edit harbor.yml (hostname, passwords)
./install.sh

Image Digest (Immutable Reference)

# Get digest
docker inspect --format='{{.RepoDigests}}' myimage:tag

# Pull by digest (immutable)
docker pull alpine@sha256:abc123...

Workflow — 推荐操作流程

Step 1: 登录仓库: docker logindocker login ghcr.io Step 2: 打标签: docker tag myapp:v1 ghcr.io/org/myapp:v1 Step 3: 推送镜像: docker push ghcr.io/org/myapp:v1 Step 4: 验证: docker pull ghcr.io/org/myapp:v1 拉取确认 Step 5: 固定版本: 生产使用 docker pull myapp@sha256:abc...

Gotchas — Common Pitfalls

  • `:latest` in production: Tags are mutable — latest can point to different images over time. → Recovery: Always pin version or digest: docker pull myapp:v1.2.3@sha256:abc....
  • Mixed public/private registries: docker login is per-registry. → Recovery: docker login registry.example.com separately; use credential helpers: docker-credential-ecr-login for AWS ECR.
  • Large image push timeout: Set max-concurrent-uploads in daemon config for large images. → Recovery: Edit /etc/docker/daemon.json: {"max-concurrent-uploads": 1} for slow connections.
  • Registry auth in CI: Use docker/login-action (GitHub Actions) or secrets manager. → Recovery: Never commit credentials; use OIDC for cloud registries instead of long-lived tokens.

Boundary — 能力边界(适用与不适用场景)

分类场景说明
✅ 能做公共仓库使用(Docker Hub/GHCR)登录、push/pull、标签管理
✅ 能做私有仓库搭建Docker Registry + Harbor 企业方案
✅ 能做标签策略制定semver/sha256/digest 对比选型
⚠️ 需条件镜像加速(registry-mirrors)需配置 daemon.json + 可用 mirror 服务
⚠️ 需条件Harbor 高可用部署需额外配置 Redis Cluster + PG 主从
❌ 超范围镜像构建使用 docker-build
❌ 超范围CVE 扫描使用 docker-scout
❌ 超范围CI/CD 镜像管理使用 docker-cicd

When NOT to Use

❌ Skip✅ Use Instead
Building imagesdocker-build
Vulnerability scanningdocker-scout
CI/CD pipelinedocker-cicd
Docker basicsdocker-basics

Security & Stability

  • Never commit registry credentials. Use CI secrets manager.
  • Use content trust: export DOCKER_CONTENT_TRUST=1 for signed images.
  • Harbor provides vulnerability scanning, replication, and RBAC.
  • No executable scripts bundled. Guidance only.

📚 官方文档参考

文档地址
Docker Hubhttps://docs.docker.com/docker-hub/
Docker Hub APIhttps://docs.docker.com/reference/api/hub/latest/
Docker Registryhttps://docs.docker.com/registry/
Harbor 项目https://goharbor.io/
镜像管理 CLIhttps://docs.docker.com/reference/cli/docker/image/
内容信任https://docs.docker.com/engine/security/trust/

🧭 Docker Skills Journey

📍 You are here: `docker-hub` — 镜像仓库管理

← Prev: docker-scout — Vulnerability scanning → Next: docker-cicd — CI/CD integration

FAQ

Q1: 如何快速上手此技能? A: 参考上方的快速开始章节,按步骤操作即可。

Q2: 遇到版本不兼容问题怎么办? A: 检查依赖版本,使用 lock 文件锁定,参考常见陷阱章节。

Q3: 如何在生产环境使用? A: 参考最佳实践章节,确保配置正确,做好监控和日志。

Q4: 性能如何优化? A: 参考性能优化相关文档,使用缓存、索引等手段。

Q5: 如何贡献或反馈问题? A: 在 GitHub 仓库提交 Issue 或 Pull Request。

Q6: 是否支持中文? A: 支持中文文档和中文注释,详见国内适配章节。

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.