title: How to get docker architecture, like amd64, arm32v7, in alpine linux?
body: <p>As the official docker alpine repository got multi-architecture support, How can I get the architecture name within the base image, especially in Dockerfile?</p>
  
  <p><a href="https://github.com/docker-library/official-images#architectures-other-than-amd64" rel="nofollow noreferrer">https://github.com/docker-library/official-images#architectures-other-than-amd64</a></p>
  
  <p>Only getting the system is 32bit or 64bit is not good enough. I prefer the result to be the same as the docker architectures, like arm32v7, arm64v8, amd64, etc. </p>
  
  <p>My goal is to bulid a nodejs docker image. For amd64, most dependences are available directly, while for some other architectures, they need to be compiled from source, in which case extra deps like python, gcc/g++ are required. I wish my script in dockerfile can figure it out and only install these extra deps only when necessary.</p>