title: docker: sed replacement fails only during docker build
body: <p>I'm baffled by this problem.
  If I run this:</p>
  <pre><code>FROM jtreminio/php:8.1
  RUN sed -i 's,^\(user \).*,\1'www\;',g'  /etc/nginx/nginx.conf
  </code></pre>
  <p>I get this error:</p>
  <pre><code>#0 0.339 sed: can't read /etc/nginx/nginx.conf: No such file or directory
  </code></pre>
  <p>But the file is there, and if I run sed from bash or with <code>docker run</code>, <strong>it works</strong>:</p>
  <pre><code>$ docker run jtreminio/php-nginx:8.1 sed -i 's,^\(user \).*,\1'www\;',g'  /etc/nginx/nginx.conf
  
  CONTAINER ID   IMAGE                     COMMAND                    CREATED          STATUS                      PORTS                                                              NAMES
  97a971771a05   jtreminio/php-nginx:8.1   &quot;sed -i 's,^\\(user \\…&quot;   25 seconds ago   Exited (0) 24 seconds ago                                                                      gifted_nightingale
  </code></pre>
  <p>what gives?</p>
  <hr />
  <p>UPDATE:</p>
  <pre><code>RUN cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
  </code></pre>
  <p>this also fails. It really looks like the file's not there. I suppose it's dynamically generated at start up. I'll keep investigating.</p>