Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] rush deploy fails with argon2 package missing in x86 docker build from ARM host #4804

Open
jwatte opened this issue Jun 25, 2024 · 1 comment

Comments

@jwatte
Copy link

jwatte commented Jun 25, 2024

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
@iclanton
Copy link
Member

This is more an issue with the package than that is with the rush deploy command itself. Does that package provide a way to override the current platform that it installs binaries for, perhaps via an environment variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: General Discussions
Development

No branches or pull requests

2 participants