rushstack
rushstack copied to clipboard
[rush] rush deploy fails with argon2 package missing in x86 docker build from ARM host
Summary
I have a project that references argon2. I develop on an ARM host, but I build an x86_64 dockerfile from this ARM host. (Using macos M3 macbook and docker on rosetta which is actually pretty great)
Unfortunately, the "rush deploy" bundles up the ARM version of the argon2 library, so when I try to run the bundled project inside the x86 docker image, it fails to find the module.
So, on MacOS, "rush deploy"
In Dockerfile, do something like:
FROM --platform=linux/amd64 node:20 COPY common/deploy /app/ ...
It will now create a deployment that doesn't work, because Rush doesn't know how to build cross-platform node_modules.
The only work-around I can think of would be to install the entire Rush toolchain in the docker container and re-build all sources on the inside, which seems like quite an additional amount of work.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
5.124.6 |
rushVersion from rush.json? |
5.124.6 |
useWorkspaces from rush.json? |
|
| Operating system? | MacOS-ARM, linux-x86_64 |
| Would you consider contributing a PR? | don't know where to start |
Node.js version (node -v)? |
v20.14.0 |