You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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?
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:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: