將本地docker鏡像轉為singularity鏡像


1.建立本地docker鏡像倉庫

①下載registry鏡像

# docker pull registry

②配置http權限支持

# vim /etc/docker/daemon.json

{

  "insecure-registries": ["192.168.1.55:5000"]

}

注:192.168.1.55是你的本機ip

③重啟docker服務

# systemctl restart docker

④運行registry的容器

# docker run -d -p 5000:5000 -v /tmp/registry:/var/lib/registry --name registry registry:latest

注:-v確保容器停止后,上傳的鏡像不會丟失。

⑤設置要上傳鏡像的tag

# docker tag hello-world 192.168.1.55:5000/hello-world

⑥將鏡像push到本地倉庫

# docker push 192.168.1.55:5000/hello-world

⑦查看

# curl http://192.168.1.55:5000/v2/_catalog

{"repositories":["hello-world"]}

 

2.生成singularity鏡像

# singularity build --nohttps hello-world.sif docker://192.168.1.55:5000/hello-world


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM