Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dermatologist/aa008726e2773b910960f16225667741 to your computer and use it in GitHub Desktop.
Save dermatologist/aa008726e2773b910960f16225667741 to your computer and use it in GitHub Desktop.
// Create a Singularity image from a Docker image that is in the Docker hub
// where /tmp/ is the folder where the image will be created and ubuntu:14.04
// is the docker image used to convert to the Singularity image
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/:/output \
--privileged -t --rm \
singularityware/docker2singularity \
ubuntu:14.04
//
#Creating a singularity image from a docker image in docker hub:
singularity pull docker://elowy01/variant_filtering
# Then, we see that there will be a new file named file.simg containing the pulled image
# and we can run the pulled container by doing:
singularity run file.simg
//
#building a prebuilt docker image:
singularity build variant_filtering.simg docker://elowy01/variant_filtering
#where 'variant_filtering.simg' is the name that will be given to the image file
//
# Print all running container instances
singularity instance.list
//
#running a certain image
singularity run docker://elowy01/variant_filtering
//
# open an interactive shell using a certain image
singularity shell variant_filtering.simg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment