title: Converting docker tar file into a singularity image?
body: <p>I am new to both Docker and Singularity.  I recently created the canonical <code>main.c</code>. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(void){
      printf("Hello Docker World!\n");
      return 0;
  }
  </code></pre>
  
  <p>I statically compiled this code, i.e.</p>
  
  <pre><code>gcc -static -static-libgcc -static-libstdc++ -o hello main.c
  </code></pre>
  
  <p>I then built the docker image and could run it, i.e.</p>
  
  <pre><code>dockerd &amp;  ## Start Docker daemon
  docker build --tag hello .
  docker run hello   ## Outputs "Hello Docker World"
  </code></pre>
  
  <p>I then <a href="https://stackoverflow.com/a/24485196/4021436">save</a> the image so that I can export it to a second computer (which does not have docker, but does have singularity), i.e.</p>
  
  <pre><code>docker save hello &gt; hello.tar
  </code></pre>
  
  <p>Now on the second machine, which does not have docker but does have singularity, I want to create a singularity image.  Tthe singularity <a href="https://singularity.lbl.gov/docs-docker" rel="noreferrer">documentation</a> give instructions on creating a singularity image from a docker image on Docker Hub, but they do not give instructions on converting from a docker tar'd file.</p>
  
  <p>Question : How would I create a singularity image from my <code>hello.tar</code></p>