title: How to build mysql docker image with custom value for max_allowed_packet?
body: <p>How to build mysql docker image with custom value for max_allowed_packet?</p>
  
  <pre><code>#my-custom.cnf
  [mysqld]
  max_allowed_packet=64M
  </code></pre>
  
  <pre><code>#Dockerfile
  FROM mysql/mysql-server:5.7 
  RUN echo "Custom mysql build" 
  COPY ./my-custom.cnf /etc/mysql/conf.d/
  RUN echo "Listing customized configurations" &amp;&amp; cat /etc/mysql/conf.d/lj-mysql.conf
  </code></pre>
  
  <p>The customized mysql container still shows 4MB only. </p>
  
  <pre><code>mysql&gt; show variables like '%max_allowed_packet%';
  +--------------------------+------------+
  | Variable_name            | Value      |
  +--------------------------+------------+
  | max_allowed_packet       | 4194304    |
  | slave_max_allowed_packet | 1073741824 |
  +--------------------------+------------+
  </code></pre>
  
  <p>Any suggestions? </p>