Open cybercoder-naj opened 1 week ago
Does this reproduce on Bun v1.1.17? The bun.lockb file is checked in to version control and copied to the Docker image right?
Yes, in my monorepo setup, updating bun to 1.1.17 locally and changing the version of the docker image does not fix the issue. Also yes. I generate a new bun.lockb
which is copied over to the docker image during build and errors when trying to build the docker image.
Any resolutions to this thread?
@cybercoder-naj I had to copy my "packages" as well.
COPY packages packages
ps. I guess it fails cause without them, bun doesn't find any packages, in the workspace.
Unfortunately, that did not solve the issue.. Inside of a docker environment, bun complains about the lock file being modified.
Hmmm strange. It works for me in Bun 1.1.18
And I got this in my package.json.
{
"workspaces": ["packages/*"]
}
Here is my reproduction repo. Can you clone this and type two commands?
# First one
bun install --production
# Second one
docker build . --tag bun-issue:1.0.0
Is this an issue only on my system? Doesn't that defeat the entire purpose of docker?
Hmmm strange. It works for me in Bun 1.1.18
@bjon same issue with 1.1.18 :(
What version of Bun is running?
1.1.13+bd6a60512
What platform is your computer?
Linux 6.6.32-1-lts x86_64 unknown
What steps can reproduce the bug?
bun init
node_modules
,bun.lockb
andindex.ts
."workspaces": ["server"]
inpackage.json
.bun create hono server
. a. In the installation process, do not install dependencies.bun install
.Dockerfile
of the following:What is the expected behavior?
When I delete
node_modules
from the root directory of the project,bun install --frozen-lockfile
succeeds without any error. However, when I build the docker image, the resultant error is,What do you see instead?
Running it locally:
But when building a docker image:
Additional information
When building a docker image in a single project, it works. The issue is with bun workspaces.