title: Singularity: What is the difference between an image, a container, and an instance?
body: <p>I am starting to learn Singularity for reproducible analysis of scientific pipelines. A colleague explained that an image was used to instantiate a container. However, in reading through the documentation and tutorials, the term <code>instance</code> is also used and the usage of <code>image</code> and <code>container</code> seems somewhat interchangeable. So, I am not sure I precisely understand the difference between an image, container, and instance. I do get that a recipe is a text file for building one of these (I think an image?). </p>
  
  <p>For example, on <a href="https://sylabs.io/guides/2.6/user-guide/running_services.html" rel="nofollow noreferrer">this page</a> it explains:</p>
  
  <blockquote>
    <p>Now we can build the definition file into an image! Simply run <code>build</code>
    and the image will be ready to go:</p>
  
  <pre><code>$ sudo singularity build url-to-pdf-api.img Singularity
  </code></pre>
  </blockquote>
  
  <p>Okay, so this uses the recipe <code>Singularity</code> to build an image, with the intuitive extension of <code>.img</code>. However, the help description of the <code>build</code> command states:</p>
  
  <blockquote>
    <p>$ singularity help build </p>
    
    <p>USAGE: singularity [...] build [build
    options...]   </p>
    
    <p>The build command
    compiles a container per a recipe (definition file) or based on a URI,
    location, or archive.</p>
  </blockquote>
  
  <p>So this seems to indicate we are building a container? </p>
  
  <p>Then, there are <code>image</code> and <code>instance</code> sub-commands.</p>
  
  <p>Are all these terms used interchangeably? It seems sometimes they are and sometimes there is a difference between them. </p>