title: How to prevent the `#!/bin/bash: not found` error when calling a script from Dockerfile
body: <p>i have the following <code>Dockerfile</code>:</p>
  
  <pre><code>FROM debian:stretch-backports
  
  MAINTAINER c33s
  
  ARG DEBIAN_FRONTEND=noninteractive
  COPY provision-base.sh /root/provision-base.sh
  RUN chmod +x /root/provision-base.sh &amp;&amp; /root/provision-base.sh
  </code></pre>
  
  <p>why do i get the following error running it:</p>
  
  <pre><code>...snip...
  /root/provision-base.sh: 1: /root/provision-base.sh: ﻿#!/bin/bash: not found
  ...snip...
  </code></pre>
  
  <ul>
  <li>the file exists <code>RUN ls /root/provision-base.sh</code> shows it</li>
  <li><code>RUN which bash</code> also shows that bash is installed</li>
  <li>the script gets started and continues after the error</li>
  <li>the build succeeds</li>
  </ul>
  
  <p>build log on dockerhub:<a href="https://hub.docker.com/r/c33s/debian/builds/bd6g8cqr2rtys9a2gguehcw/" rel="nofollow noreferrer">https://hub.docker.com/r/c33s/debian/builds/bd6g8cqr2rtys9a2gguehcw/</a> (snip of the build log also on pastebin <a href="https://pastebin.com/6x1UK53H" rel="nofollow noreferrer">https://pastebin.com/6x1UK53H</a>)</p>