title: Docker: chmod: cannot access 'chmod': No such file or directory
body: <p>I am building a <strong>Rails</strong> application on <strong>Ubuntu</strong> 18.04 and I trying to set up the deployment of the application using docker.</p>
  <p>I have 2 entrypoint files:</p>
  <ul>
  <li>docker/entrypoints/docker-entrypoint.sh</li>
  <li>docker/entrypoints/sidekiq-entrypoint.sh</li>
  </ul>
  <p>Usually, to make the files executable, I have to run the commands below in my host machine terminal:</p>
  <pre><code>chmod +x docker/entrypoints/docker-entrypoint.sh
  chmod +x docker/entrypoints/sidekiq-entrypoint.sh
  </code></pre>
  <p>However, I would like to make this possible in the Dockerfile, without having to always do it on the host machine's terminal.</p>
  <p>For this, I added the command below in the Dockerfile:</p>
  <pre><code>RUN chmod +x docker/entrypoints/docker-entrypoint.sh \
      chmod +x docker/entrypoints/sidekiq-entrypoint.sh
  ENTRYPOINT [&quot;./docker/entrypoints/docker-entrypoint.sh&quot;]
  </code></pre>
  <p>But then I run into this error:</p>
  <blockquote>
  <p>chmod: cannot access 'chmod': No such file or directory</p>
  <p>chmod: cannot access '+x': No such file or directory</p>
  <p>ERROR: Service 'app' failed to build: The command '/bin/sh -c chmod +x docker/entrypoints/docker-entrypoint.sh     chmod +x docker/entrypoints/sidekiq-entrypoint.sh' returned a non-zero code: 1</p>
  </blockquote>
  <p>I have tried a few solutions, but none has worked so far. Any form of help would be gladly appreciated.</p>