如何从dockerfile构建奇异容器 [英] how to build singularity container from dockerfile
问题描述
我想从dockerfile构建奇异容器.
I want to build singularity container from dockerfile.
我已经从Docker Hub提取并运行了Docker镜像,具有奇异之处.
I have pulled and run docker images from docker hub with singularity.
singularity pull docker://ubuntu:latest
我还从奇异配方文件中构建了图像.
I have also build the image from singularity recipe file.
singularity build cpp.sif singularity_file
但是我想从dockerfile构建奇异映像.
But I want to build singularity image from dockerfile.
任何人都知道该怎么做.有可能吗?
Anyone know how to do it. Is it possible ???
推荐答案
您不能直接从Dockerfile构建 奇异容器,但是可以分两步完成.
You cannot build a singularity container directly from a Dockerfile, but you can do it in a two-step process.
docker build -t local/my_container .
sudo singularity build my_container.sif docker-daemon://local/my_container
使用 docker://my_container
在Docker Hub上查找容器.当您使用 docker-daemon
时,它将查看您本地构建的docker容器.您也可以在奇点定义文件中使用 Bootstrap:docker-daemon
.
Using docker://my_container
look for the container on Docker Hub. When you use docker-daemon
, it looks at your locally built docker containers. You can also use Bootstrap: docker-daemon
in a Singularity definition file.
这篇关于如何从dockerfile构建奇异容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!