title: Docker COPY not copying file
body: <p>I have reviewed some of the other answers here on SO and I do not think any of them apply to me (e.g. I have no <code>.dockerignore</code>).</p>
  <p>I have a docker file that contains the following:</p>
  <pre><code>COPY php-config/nginx.conf /etc/nginx/nginx.conf
  COPY php-config/fpm-pool.conf /etc/php/8.0/fpm/pool.d/www.conf
  COPY php-config/php.ini /etc/php/8.0/fpm/conf.d/99-custom.ini
  COPY php-config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  </code></pre>
  <p>The build process (I'm using <code>kaniko</code> via <code>gitlab</code> to build an image <a href="https://docs.gitlab.com/ee/ci/docker/using_kaniko.html" rel="nofollow noreferrer">https://docs.gitlab.com/ee/ci/docker/using_kaniko.html</a> ) appears to perform the neceessary actions:</p>
  <pre><code>INFO[0253] Taking snapshot of full filesystem...        
  INFO[0253] COPY php-config/nginx.conf /etc/nginx/nginx.conf 
  INFO[0253] Taking snapshot of files...                  
  INFO[0253] COPY php-config/fpm-pool.conf /etc/php/8.0/fpm/pool.d/www.conf 
  INFO[0253] Taking snapshot of files...                  
  INFO[0253] COPY php-config/php.ini /etc/php/8.0/fpm/conf.d/99-custom.ini 
  INFO[0253] Taking snapshot of files...                  
  INFO[0253] COPY php-config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf 
  INFO[0253] Taking snapshot of files...   
  
  
   
  </code></pre>
  <p>However I get an error on attempting to <code>docker run</code> the container after successful build :</p>
  <pre><code>Error: could not find config file /etc/supervisor/conf.d/supervisord.conf
  For help, use /usr/bin/supervisord -h  
  </code></pre>
  <p>I can confirm that all four files exist in the source directory.</p>
  <p>I can also confirm that all the destination directories exist (i.e. I have inspected the image via <code>docker run --rm -it *pathtocontainer* bash</code>). My manual inspection also confirms only 3/4 files actually copied.</p>
  <h1>=======</h1>
  <p>Re: Question in Comments</p>
  <pre><code>INFO[0253] COPY php-config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf 
  INFO[0253] Taking snapshot of files...                  
  INFO[0253] RUN ls -gAlFh /etc/supervisor/conf.d         
  INFO[0253] cmd: /bin/sh                                 
  INFO[0253] args: [-c ls -gAlFh /etc/supervisor/conf.d]  
  INFO[0253] Running: [/bin/sh -c ls -gAlFh /etc/supervisor/conf.d] 
  total 4.0K
  -rw-rw-rw- 1 root 459 Jul  5 16:13 supervisord.conf
  INFO[0253] Taking snapshot of full filesystem...        
  INFO[0253] RUN mkdir /run/nginx   &amp;&amp; chown -R nobody:nogroup /usr/share/nginx   &amp;&amp; chown -R nobody:nogroup /run/nginx   &amp;&amp; chown -R nobody:nogroup /var/log/nginx 
  INFO[0253] cmd: /bin/sh                                 
  INFO[0253] args: [-c mkdir /run/nginx   &amp;&amp; chown -R nobody:nogroup /usr/share/nginx   &amp;&amp; chown -R nobody:nogroup /run/nginx   &amp;&amp; chown -R nobody:nogroup /var/log/nginx] 
  INFO[0253] Running: [/bin/sh -c mkdir /run/nginx   &amp;&amp; chown -R nobody:nogroup /usr/share/nginx   &amp;&amp; chown -R nobody:nogroup /run/nginx   &amp;&amp; chown -R nobody:nogroup /var/log/nginx] 
  INFO[0253] Taking snapshot of full filesystem...        
  INFO[0253] EXPOSE 8080                                  
  INFO[0253] cmd: EXPOSE                                  
  INFO[0253] Adding exposed port: 8080/tcp                
  INFO[0253] USER nobody                                  
  INFO[0253] cmd: USER                                    
  INFO[0253] CMD [&quot;/usr/bin/supervisord&quot;, &quot;-c&quot;, &quot;/etc/supervisor/conf.d/supervisord.conf&quot;] 
  INFO[0253] Pushing image to foobar.example.com:5050/devops/debian/php:master 
  INFO[0259] Pushing image to foobar.example.com:5050/devops/debian/php:3259b0fd 
  INFO[0259] Pushing image to foobar.example.com:5050/devops/debian/php:latest 
  INFO[0259] Pushed image to 3 destinations               
  Cleaning up file based variables 00:01
  Job succeeded
  </code></pre>