build deps on different platform

Well, as long as OS is the same you can build dependencies on host system and COPY deps . in Dockerfile. I’ve done that in the past in CircleCI when I had “build” job in the image with the same OS so I could cache that step in CircleCI and later pass to docker.