SingularityContainerCreation: Difference between revisions

From T2B Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
== Creation of a container using a definition file ==
== Creation of a container using a definition file ==
A definition file is a recipe to build a container starting from something else, generally another Singularity or Docker container. Let's create a definition file 'test1.def' with the following content :
A definition file is a recipe to build a container starting from something else, generally another Singularity or Docker container. Let's create a definition file 'test1.def' with the following content :
{{{
<pre>
Bootstrap: docker
Bootstrap: docker


From: centos:latest
From: centos:latest
}}}
</pre>
The first line indicates that we will use a container from [https://hub.docker.com/explore/ Docker hub], the second line specifies which container (the latest release of CentOS).





Revision as of 15:21, 30 October 2018

Prerequisites

By default, ordinary users don't have the right to create Singularity containers. You must either do it as root, or to work with sudoer account (the best option !).

Creation of a containers

On this page, we will not explain all the methods that exist to build a container, this is already done here. Instead, we will illustrate one method that can rapidly be adopted.

Creation of a container using a definition file

A definition file is a recipe to build a container starting from something else, generally another Singularity or Docker container. Let's create a definition file 'test1.def' with the following content :

Bootstrap: docker

From: centos:latest

The first line indicates that we will use a container from Docker hub, the second line specifies which container (the latest release of CentOS).


Sources