【docker】Ubuntu22使用skopeo离线推送镜像

1,准备安装skopeo

bash 复制代码
# 安装skopeo
apt install skopeo --fix-missing
# 创建目录
mkdir -p skopeo_bundle
# 拷贝主要的
cp /usr/bin/skopeo skopeo_bundle/
# 下载依赖库
ldd /usr/bin/skopeo | awk '{print $3}' | grep '/' | xargs -I '{}' cp -v '{}' skopeo_bundle/
# 压缩
tar czf skopeo_bundle.tar.gz skopeo_bundle

2,需要新建个文件,配置安全策略。

bash 复制代码
cat > /etc/containers/policy.json <<'EOF'
{
  "default": [
    {
      "type": "insecureAcceptAnything"
    }
  ]
}
EOF

3,安装命令如下

bash 复制代码
skopeo copy \
  docker-archive:app.a-client.1.1.0-rc.11.container.tar.gz \
  docker://172.16.121.80:5443/a-client:1.1.0-rc.11 \
  --dest-creds ap:passwd \
  --dest-tls-verify=false
相关推荐
SkyWalking中文站1 天前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
雪梨酱QAQ2 天前
Kubeneters HA Cluster部署
运维
lichenyang4532 天前
Docker 学习笔记(五):Docker Compose,用一个 YAML 启动前端、后端和 MongoDB
docker
lichenyang4532 天前
Docker 学习笔记(四):Dockerfile,把项目打成自己的镜像
docker·容器
lichenyang4532 天前
Docker 学习笔记(三):Docker 网络、bridge、子网和容器互通
docker·容器
lichenyang4532 天前
Docker 学习笔记(二):docker run 的参数到底在控制什么?
docker·容器
江华森2 天前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森2 天前
Matplotlib 数据绘图基础入门
运维
江华森2 天前
NumPy 数值计算基础入门
运维
乘云数字DATABUFF6 天前
5分钟部署开源APM Databuff:OpenTelemetry全链路追踪入门实战
运维·后端