<p>I'm getting a case of <code>CrashLoopBackoff</code> while my logs say:</p>

<blockquote>
  <p>"/abc.sh" permission denied.</p>
</blockquote>

<p>This is my <code>DockerFile</code>:</p>

<pre><code>FROM python:3.6.3

COPY abc.sh /abc.sh

CMD["/bin/bash","-c","/abc.sh"]
</code></pre>

<p>The entry point is given in deployment.yml file. After I apply the deployment.yml with the image created by above <code>DockerFile</code>, it shows: </p>

<blockquote>
  <p>/abc.sh permission denied.</p>
</blockquote>

<p>Despite the fact that permissions are 755 on <code>/abc.sh</code> and <code>/abc.sh</code> is having owners as <code>root:root</code>.</p>

<p>I have already tried:</p>

<pre><code>FROM python:3.6.3

COPY abc.sh /abc.sh

USER root

CMD["/bin/bash","-c","/abc.sh"]
</code></pre>

<p>and </p>

<pre><code>FROM python:3.6.3

COPY abc.sh /abc.sh

USER root

CMD ["su","-","root","/bin/bash"]

CMD["/bin/bash","-c","/abc.sh"]
</code></pre>

<p>I want to start the pod with 2 scripts:
1)one is entry point which is in deployment file 
2)other is in Dockerfile</p>

Nancy
<p>You don't need to use root for this case. This is happening because your shell script is not permitted to execute or an executable. You need to run the following before you run the shell script:</p>

<pre><code>chmod +x /abc.sh
</code></pre>
