Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ COPY libs/platform/package*.json ./libs/platform/
COPY libs/model-resolver/package*.json ./libs/model-resolver/
COPY libs/dependency-resolver/package*.json ./libs/dependency-resolver/
COPY libs/git-utils/package*.json ./libs/git-utils/
COPY libs/spec-parser/package*.json ./libs/spec-parser/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This correctly fixes the build failure. However, this pattern of manually adding a COPY line for each new library is error-prone, as this PR itself demonstrates.

A more maintainable approach would be to use a single command to copy all library package.json files. If you are using Docker BuildKit, you can replace the entire block of COPY instructions (lines 24-31) with a single line. This would automatically handle new libraries in the future.

First, ensure BuildKit is enabled by adding # syntax=docker/dockerfile:1 to the top of your Dockerfile. Then, you can use:

COPY --parents libs/*/package*.json ./

If you can't use BuildKit, consider at least sorting the block of COPY commands alphabetically to make it easier to manage.


# Copy scripts (needed by npm workspace)
COPY scripts ./scripts
Expand Down