question about Singularity bootstap from docker
Jia94 opened this issue · comments
Excuse me !
There is a docker image that built on my own,so if I want to creat one Sinualrity image based upon this docker image ,do I have to pull the docker image to Docker Hub? and then how I write the section of "From"?
The easiest thing is to:
- Get the image on Docker Hub. You can do that with push or an automated build from a Github repository. I like the second because I can just put my Dockerfile on Github, and it will build for me when I push commits :)
- Once the image is done building (green successful build) you Bootstrap recipe would look like this:
Bootstrap: docker
From: Jia94/image-name
...
- Then build or pull. You could also just build it directly, or pull, either of these would work:
# Without definition file
singularity pull docker://Jia94/image-name
sudo singularity build myimage.simg docker://Jia94/image-name
# With definition file "Singularity" shown above
sudo singularity build myimage.simg Singularity
The only benefit to using a definition file is if you want to modify the image after build on Docker Hub. If not, you would be able to just pull or build without it.