title: Docker RUN fails with "returned a non-zero code: 6"
body: <p>I have the following in my docker file:</p>
  
  <pre><code>RUN sudo apt-get install sshpass -y
  RUN sshpass -p userPassword scp -r user@server:~/data/* ./
  </code></pre>
  
  <p>But when I try and build my image it fails with:</p>
  
  <pre><code>Exception caught: The command '/bin/sh -c sshpass -p userPassword scp -r user@server:~/data/* ./' returned a non-zero code: 6 -&gt; [Help 1]
  </code></pre>
  
  <p>However, if I remove these lines, build the image, ssh onto the container and manually run the command from bash it works perfectly.</p>
  
  <p>Can anyone tell me how to get around this?</p>