跳到主要内容

Container Awesome

Storage, Metadata, Runtime

$HOME/.docker/config.json
{
"credsStore": "osxkeychain"
}

Image

Runtime

CLI

  • ctr,nerdctl -> containerd
    • contaiNERD CTL
  • crictl -> cri -> containerd
    • cri 是 kubelet 接口

工具

  • sigstore/cosign
    • Container Signing
  • plexsystems/sinker
    • 同步镜像
    • 使用 github.com/docker/docker/client 操作 docker
    • 使用 github.com/google/go-containerregistry 操作 仓库
go install github.com/plexsystems/sinker@latest
sinker push
.images.yaml
target:
host: mycompany.com
repository: myteam
sources:
- repository: coreos/prometheus-operator
host: quay.io
tag: v0.40.0

curl https://hub.docker.com/v2/repositories/wener/base/tags | jq

# Registry API
curl https://ustc-edu-cn.mirror.aliyuncs.com/v2/wener/base/tags/list | jq -r '.tags | .[]'

Build

问题

  • 是否需要 Linux 环境
  • 是否需要 Privilege 环境
  • 是否需要守护进程
  • 是否支持跨平台
  • Manifest 支持
  • 缓存支持
  • 易用性

Inspect

docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 7001:7001 \
--name diving vicanso/diving

Learn