Use a multistage Dockerfile #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Normally I'd want to make a multistage Dockerfile so that Yarn wasn't present in the final image. However, something was going wrong where if I installed production dependencies in a buildstage and copied them over via
COPY, Node.js would fail to find the modules.Meanwhile, installing directly into the final image was fine.
I will investigate this later as it's not a priority.
My original Dockerfile:
The error:
We switched from pnpm node linker to node-modules. Figured I'd just see if that change would be enough to solve this, however it was not. I didn't give it an in-depth look this time, but this is the latest version of the Dockerfile anyway:
Same error!