title: How do I add an additional command line tool to an already existing Docker/Singularity image?
body: <p>I work in neuroscience, and I use a cloud platform called Brainlife to upload and download data (linked <a href="https://brainlife.io/" rel="nofollow noreferrer">here</a>, but I don't think knowledge of Brainlife is relevant to this question). I use Brainlife's command line interface to upload and download data on my university's server. In order to use their CLI, I run Singularity with a Docker image created by  Brainlife (found <a href="https://hub.docker.com/r/brainlife/cli" rel="nofollow noreferrer">here</a>). I run this using the following code:</p>
  <pre><code>singularity shell docker://brainlife/cli -B
  </code></pre>
  <p>I also have the file saved on my server account, and can run it like this:</p>
  <pre><code>singularity shell brainlifeimage.sif -B
  </code></pre>
  <p>After running one of those commands, I am able to download and upload data, usually successfully. Currently I'm following Brainlife's tutorial to bulk download data. The tutorial uses the command line tool &quot;jq&quot; (<a href="https://stedolan.github.io/jq/" rel="nofollow noreferrer">link</a>), which isn't on their docker image. I tried installing it within the Singularity shell like this:</p>
  <pre><code>apt-get install jq
  </code></pre>
  <p>And it returned:</p>
  <pre><code>Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  W: Not using locking for read only lock file /var/lib/dpkg/lock
  E: Unable to locate package jq
  </code></pre>
  <p>Is there an easy way to add this one tool to the image? I've been reading over the Singularity and Docker documentations, but Docker is all new to me and I'm really lost.</p>
  <p>If relevant, my university server runs on Ubuntu 16.04.7 LTS, and I am using terminal on a Mac laptop running MacOS 11.3. This is my first stack overflow question - please let me know if i can provide any additional info! Thanks so much.</p>