title: Loading openSSL inside a docker container on macos silicon
body: <p>I just migrated my old MacBook Pro to a new Macbook Pro with Apple silicon. I'm now getting an error building a previously happily built docker container, where gcc is unable to find openssl.</p>
  <pre><code>#13 34.89   gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.8 -c build/temp.linux-aarch64-3.8/_openssl.c -o build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/_openssl.o -Wconversion -Wno-error=sign-conversion
  #13 34.89   build/temp.linux-aarch64-3.8/_openssl.c:575:10: fatal error: openssl/opensslv.h: No such file or directory
  #13 34.89     575 | #include &lt;openssl/opensslv.h&gt;
  #13 34.89         |          ^~~~~~~~~~~~~~~~~~~~
  #13 34.89   compilation terminated.
  </code></pre>
  <p>I installed both x64 and arm64 versions of brew and openssl following the instructions here: <a href="http://sixty-north.com/blog/pyenv-apple-silicon.html" rel="nofollow noreferrer">http://sixty-north.com/blog/pyenv-apple-silicon.html</a></p>
  <p>I confirmed both versions of openssl are installed:</p>
  <pre><code>➜  file /opt/homebrew/Cellar/openssl@1.1/1.1.1l_1/bin/openssl
     /opt/homebrew/Cellar/openssl@1.1/1.1.1l_1/bin/openssl: Mach-O 64-bit executable arm64
  ➜  Cellar file /usr/local/Cellar/openssl@1.1/1.1.1l_1/bin/openssl
     /usr/local/Cellar/openssl@1.1/1.1.1l_1/bin/openssl: Mach-O 64-bit executable x86_64
  </code></pre>
  <p>Finally I can see the header files in the two locations that brew installs for each compiler:</p>
  <pre><code>➜  ls -l /opt/homebrew/opt/openssl@1.1/include/openssl/opensslv.h
     -rw-r--r--  1 andrewllacy  admin  4102 Aug 24 06:38 /opt/homebrew/opt/openssl@1.1/include/openssl/opensslv.h
  ➜   ls -l /usr/local/opt/openssl@3/include/openssl/opensslv.h
     -rw-r--r--  1 andrewllacy  admin  3184 Sep  7 04:46 /usr/local/opt/openssl@3/include/openssl/opensslv.h
  </code></pre>
  <p>How can I troubleshoot this? I imagine it might be a problem with compile flags or path but not sure how to know where the gcc compiler being invoked during the building of a docker image is expecting to find opensslv.h?</p>