title: Docker clamav AWS lambda layer build on mac M1
body: <p>Attempting to run the docker file from here</p>
  <p><a href="https://dev.to/sutt0n/using-a-lambda-container-to-scan-files-with-clamav-via-serverless-2a5g" rel="nofollow noreferrer">https://dev.to/sutt0n/using-a-lambda-container-to-scan-files-with-clamav-via-serverless-2a5g</a></p>
  <p>I get an error</p>
  <blockquote>
  <p>=&gt; ERROR [10/52] RUN yumdownloader -x *i686 --archlist=x86_64 clamav</p>
  </blockquote>
  <pre><code>#13 4.564 64 packages excluded due to repository priority protections
  #13 4.623 No Match for argument clamav
  #13 4.623 Nothing to download
  </code></pre>
  <p>I am guessing that I need the i686 binary to run on AWS. How to get this to work?</p>
  <p>Epel is installed</p>
  <pre><code> =&gt; CACHED [ 9/54] RUN amazon-linux-extras install epel -y                                                                                                                                                                                                                                                                                                         0.0s
   =&gt; [10/54] RUN yum install -y epel-release                                                                                                                                                                                                                                                                                                                        3.4s
   =&gt; [11/54] RUN yum install -y cpio yum-utils tar.x86_64 gzip zip       
  </code></pre>
  <p>I started the docker container and login</p>
  <blockquote>
  <p>docker exec -it 31a81f061b7e bash</p>
  </blockquote>
  <p>Editing cat /etc/yum/pluginconf.d/priorities.conf  does nothing.</p>
  <pre><code># yum repolist
  Loaded plugins: ovl, priorities
  213 packages excluded due to repository priority protections
  
  repo id                 repo name                         status
  amzn2-core/2/aarch64    Amazon Linux 2 core repository    19985
  amzn2extra-epel/2/aarch64  Amazon Extras repo for epel    1 
  epel/aarch64             Extra Packages for Enterprise Linux 7 - aarch64       12775+213
  </code></pre>
  <p>repolist: 32761</p>
  <p>Shows ARM architecture.</p>
  <pre><code> # yum search clamav
   Loaded plugins: ovl
   === N/S matched: clamav ========
  clamav-filesystem.noarch : Filesystem structure for clamav
  clamav-unofficial-sigs.noarch : Scripts to download unofficial clamav signatures
  clamav.aarch64 : End-user tools for the Clam Antivirus scanner
  clamav-data.noarch : Virus signature data for the Clam Antivirus scanner.
  clamav-devel.aarch64 : Header files and libraries for the Clam Antivirus scanner
   clamav-lib.aarch64 : Dynamic libraries for the Clam Antivirus scanner
  clamav-milter.aarch64 : Milter module for the Clam Antivirus scanner
  clamav-update.aarch64 : Auto-updater for the Clam Antivirus scanner data-files
  </code></pre>
  <p>Probably <em>clamav.aarch64</em>.</p>
  <p>Take a guess, edit the Dockerfile. Sadly no.</p>
  <pre><code> ERROR [11/53] RUN yumdownloader -x *i686 --archlist=x86_64 clamav.x86_64  
  </code></pre>