Is it really weird to me how little-known the art of cross-compilation is. You can target x86 from an ARM build box, or the other way around.
Is it really weird to me how little-known the art of cross-compilation is. You can target x86 from an ARM build box, or the other way around.
> I installed node v16 on both my MacBook and the cloud instance, installed our app and then ran the full end to end test suite.
Given this statement, it doesn't seem like there should be any cross-platform issues at all here (even in included npm packages). It doesn't sound like any of the tests are arch specific.
But I don't use Node.js very often, so maybe I am missing something?
See that, for the same tag (version) you have images with different hashes (hence content) for different architectures:
So, why not build two different Docker images that are the same except for arch? It seems that the problem isn’t the difference between dev and production environments, but the way Docker is being used. Sure, run an arch specific test before moving something to production, that makes sense. But for development, just use the Docker image that matches the dev arch. This seems like a much easier problem than the author is making it out to be.
Before Docker, I don’t think this would have been an issue.
But you aren't far fetched at all with that idea you have, and can be done using a Docker multi-stage build: You build all your application with whatever platform you have (either locally or for CI), and then you import your application layer from an ARM64 image in one side, and from and AMD64 in the other.
We aren't still very used to multi-platform development environments, so the tooling isn't still perfect (at all).