title: Error instruction COPY on Dockerfile
body: <p>I'm building MYSQL image on docker with Dockerfile. I need help, because I have this problem:
  <a href="https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded">Authentication plugin &#39;caching_sha2_password&#39; cannot be loaded</a></p>
  
  <p>Aman Aggarwal's solution is worked for me, but I need write it on my custom my.cnf and I try to rewrite my.cnf default with it, but I get a error when I do docker build:</p>
  
  <blockquote>
    <p>COPY failed: stat /var/lib/docker/tmp/docker-builder204357196/my.cnf: no such file or directory</p>
  </blockquote>
  
  <p><strong>This is my custom my.cnf:</strong></p>
  
  <pre><code># Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation; version 2 of the License.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; if not, write to the Free Software
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  
  #
  # The MySQL  Server configuration file.
  #
  # For explanations see
  # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
  
  [mysqld]
  default_authentication_plugin = mysql_native_password
  pid-file        = /var/run/mysqld/mysqld.pid
  socket          = /var/run/mysqld/mysqld.sock
  datadir         = /var/lib/mysql
  secure-file-priv= NULL
  # Disabling symbolic-links is recommended to prevent assorted security risks
  symbolic-links=0
  
  # Custom config should go here
  !includedir /etc/mysql/conf.d/
  </code></pre>
  
  <p><strong>And this is my Dockerfile:</strong></p>
  
  <pre><code># Indicates that the mysql image will be used as the base image.
  FROM mysql
  
  #Try copy my.cnf on this path /etc/mysql/
  COPY my.cnf /etc/mysql/my.cnf
  
  #Try only to restart mysql (not container)
  RUN service mysql restart
  </code></pre>
  
  <p><strong>My structure of folders:</strong></p>
  
  <pre><code>proyectos(folder)
    -&gt;build_docker
        -&gt;Dockerfile
        -&gt;my.cnf
  </code></pre>