<p>I am currently trying to deal with a deployment to a kubernetes cluster. The deployment keeps failing with the response </p>

<pre><code> Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"/entrypoint.sh\": permission denied"
</code></pre>

<p>I have tried to change the permissions on the file which seem to succeed as if I ls -l I get -rwxr-xr-x as the permissions for the file.</p>

<p>I have tried placing the chmod command both in the dockerfile itself and prior to the image being built and uploaded but neither seems to make any difference.
Any ideas why I am still getting the error?</p>

<p>dockerfile below </p>

<pre><code>FROM node:10.15.0
CMD []
ENV NODE_PATH /opt/node_modules

# Add kraken files
RUN mkdir -p /opt/kraken
ADD .  /opt/kraken/
# RUN chown -R node /opt/
WORKDIR /opt/kraken

RUN npm install &amp;&amp; \
    npm run build &amp;&amp; \
    npm prune --production

# Add the entrypoint
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER node
ENTRYPOINT ["/entrypoint.sh"]
</code></pre>

<p>This error is not about entrypoint error but command inside. Always start scripts with "sh script.sh" either entrypoint or cmd. In this case it would be: ENTRYPOINT ["sh",  "entrypoint.sh"]</p>
