Container builds fail in CodeBuild with "cannot copy to non-directory"

Đang mở
#2,537 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
64/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, node.js
Lĩnh vực
build-system

Hướng nghiên cứu

Locate ContainerSourceAsset and trace how .dockerignore is merged with CONTAINER_CONTEXT_SECRET_EXCLUDES under IgnoreMode.DOCKER, then check whether ignore matching resolves symlinked paths (pnpm's node_modules symlinks) before comparing. Search the repo for existing tests of the build-context upload and add a fixture reproducing a pnpm workspace layout with a symlinked node_modules. Done when a directory COPY from that context no longer trips on the symlink and node_modules content never reaches the uploaded context.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Container builds fail in CodeBuild with "cannot copy to non-directory" when the build context is a pnpm workspace. In pnpm, app/<agent>/node_modules/@scope/<pkg> is a symlink to ../../packages/<pkg>. ContainerSourceAsset layers .dockerignore over CONTAINER_CONTEXT_SECRET_EXCLUDES with IgnoreMode.DOCKER, but the nested symlinked node_modules still reaches the uploaded context and a COPY of that directory then fails - even with node_modules/ in .dockerignore. Workaround is copying source files individually instead of by directory, which works but silently drifts out of date as files are added.

version: AgentCoreCLI/0.24.2 (darwin 25.5.0; node/v22.18.0)

Ngôn ngữ chính
TypeScript
Star
339
Fork
129
Merge trung bình
19 giờ 21 phút
Pull request đã merge (30 ngày)
125

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws/agentcore-cli

Tất cả issue của aws/agentcore-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.