singularityware.github.io icon indicating copy to clipboard operation
singularityware.github.io copied to clipboard

question about Singularity bootstap from docker

Open Jia94 opened this issue 7 years ago • 1 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"?

Jia94 avatar May 09 '18 03:05 Jia94

The easiest thing is to:

  1. 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 :)
  2. Once the image is done building (green successful build) you Bootstrap recipe would look like this:
Bootstrap: docker
From: Jia94/image-name

...
  1. 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.

vsoch avatar May 09 '18 03:05 vsoch