title: Errors Installing singularity inside dockerfile
body: <p>I am trying to run a nextflow pipeline which uses an older version of nextflow (21.04.3) and java version 8. Since I have to use this pipeline on a remote server, therefore I can only use singularity.</p>
  <p>As this nextflow pipeline also uses singularity pull calls therefore I need the singularity installed inside the docker image as well. Then, I can convert this image docker image to a singularity image and then I can move it to the remote server.</p>
  <p>I am trying to install singularity inside dockerfile but I am getting errors,</p>
  <p>This is the dockerfile that I am using,</p>
  <pre><code>FROM python:3.8.9-slim 
  LABEL authors=&quot;phil.ewels@scilifelab.se,erik.danielsson@scilifelab.se&quot; \
    description=&quot;Docker image containing requirements for the nfcore tools&quot;
  
  # Do not pick up python packages from $HOME
  ENV PYTHONNUSERSITE=1
  
  # Update pip to latest version
  RUN python -m pip install --upgrade pip
  
  # Install dependencies
  COPY requirements.txt requirements.txt
  RUN python -m pip install -r requirements.txt
  
  # Install Nextflow dependencies
  RUN apt-get update \
    &amp;&amp; apt-get upgrade -y \
    &amp;&amp; apt-get install -y git \
    &amp;&amp; apt-get install -y wget
  
  # Create man dir required for Java installation 
  # and install Java
  RUN mkdir -p /usr/share/man/man1 \
    &amp;&amp; apt-get install -y  openjdk-11-jre \
    &amp;&amp; apt-get clean -y &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  # Install Singularity 
  RUN wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list &amp;&amp; \ apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 &amp;&amp; \ apt-get update 
  
  RUN apt-get install -y singularity-container
  
  # Setup ARG for NXF_VER ENV
  ARG NXF_VER=&quot;&quot;
  ENV NXF_VER ${NXF_VER}
  # Install Nextflow
  RUN wget https://github.com/nextflow- io/nextflow/releases/download/v21.04.3/nextflow | bash \
    &amp;&amp; mv nextflow /usr/local/bin \
    &amp;&amp; chmod a+rx /usr/local/bin/nextflow
  # Add the nf-core source files to the image
  COPY . /usr/src/nf_core
  WORKDIR /usr/src/nf_core
  
  # Install nf-core
  RUN python -m pip install .
  
  # Set up entrypoint and cmd for easy docker usage
  CMD [ &quot;.&quot; ]
  </code></pre>
  <p>These are the errors I am getting</p>
  <pre><code>Step 9/17 : RUN wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | tee 
  /etc/apt/sources.list.d/neurodebian.sources.list &amp;&amp; \ apt-key adv --recv-keys -- 
  keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 &amp;&amp; \ apt-get update
  ---&gt; Running in afc3dcbbd1ee
  --2022-03-17 17:40:19--  http://neuro.debian.net/lists/xenial.us-ca.full
  Resolving neuro.debian.net (neuro.debian.net)... 129.170.233.11
  Connecting to neuro.debian.net (neuro.debian.net)|129.170.233.11|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 262
  Saving to: ‘STDOUT’
  
   0K                                                       100% 18.4M=0s
  
  deb http://neurodeb.pirsquared.org data main contrib non-free
  #deb-src http://neurodeb.pirsquared.org data main contrib non-free
  deb http://neurodeb.pirsquared.org xenial main contrib non-free
  #deb-src http://neurodeb.pirsquared.org xenial main contrib non-free
  2022-03-17 17:40:19 (18.4 MB/s) - written to stdout [262/262]
  
  /bin/sh: 1:  apt-key: not found
  The command '/bin/sh -c wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list &amp;&amp; \ apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 &amp;&amp; \ apt-get update' 
  returned a non-zero code: 127
  </code></pre>
  <p>I there a way to install singularity using a dockerfile ?</p>
  <p>Thanks</p>