1,准备安装skopeo
1 2# 安装skopeo 3apt install skopeo --fix-missing 4# 创建目录 5mkdir -p skopeo_bundle 6# 拷贝主要的 7cp /usr/bin/skopeo skopeo_bundle/ 8# 下载依赖库 9ldd /usr/bin/skopeo | awk '{print $3}' | grep '/' | xargs -I '{}' cp -v '{}' skopeo_bundle/ 10# 压缩 11tar czf skopeo_bundle.tar.gz skopeo_bundle
2,需要新建个文件,配置安全策略。
1cat > /etc/containers/policy.json <<'EOF' 2{ 3 "default": [ 4 { 5 "type": "insecureAcceptAnything" 6 } 7 ] 8} 9EOF
3,安装命令如下
1skopeo copy \ 2 docker-archive:app.a-client.1.1.0-rc.11.container.tar.gz \ 3 docker://172.16.121.80:5443/a-client:1.1.0-rc.11 \ 4 --dest-creds ap:passwd \ 5 --dest-tls-verify=false
《【docker】Ubuntu22使用skopeo离线推送镜像》 是转载文章,点击查看原文。