dockerfile-bun-install-without-frozen-lockfile
Detects Node Dockerfiles that run Bun dependency installation without frozen lockfile behavior while a Bun lockfile is available in the Docker build context.
This rule looks for:
- a Docker build discovered from GitHub Actions
bun.lockorbun.lockbin the build contextRUN bun install,RUN bun i, orRUN bun add- no
--frozen-lockfileflag on that Dockerfile instruction - global installs such as
bun add -gare out of scope
Why it matters:
bun ciandbun install --frozen-lockfileinstall exact versions from the committed Bun lockfile.- They fail when
package.jsondisagrees with the lockfile. - Plain
bun install,bun i, orbun addcan update dependency state during Docker image builds.
What to do:
- Use
bun ciin Dockerfiles when a Bun lockfile is present. - Or use
bun install --frozen-lockfile. - Avoid
bun addduring Docker image builds.
This rule is focused on deterministic Docker dependency installs, not local developer install behavior.