title: "Permission denied" on file when running a docker container
body: <p>I have a file that I can't edit but needs to run on in a docker container. Because the file doesn't have an extension, I have to use chmod for setting the file executable. But after I build the docker image from the docker file I always get a <code>&quot;permission denied&quot; error</code></p>
  <p>My docker file:</p>
  <pre><code>FROM alpine
  
  COPY . /home/guestuser/bin/gateway
  
  RUN apk add libressl-dev
  RUN apk add libffi-dev
  
  RUN pwd
  
  WORKDIR /home/guestuser/bin/.
  RUN [&quot;chmod&quot;, &quot;+x&quot;, &quot;gateway&quot;]
  
  RUN pwd
  
  CMD [&quot;/home/guestuser/bin/gateway&quot;]
  
  
  EXPOSE 11878
  </code></pre>
  <p>I alwas get this error:</p>
  <pre><code>docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused &quot;exec: \&quot;/home/guestuser/bin/gateway\&quot;: permission denied&quot;: unknown.
  </code></pre>
  <p>As I already mentioned, I am not able to edit the file I want to execute. What am I doing wrong?</p>