fix(binary): address missing dockerfile in container agents - #2139
Open
Hweinstock wants to merge 1 commit into
Open
fix(binary): address missing dockerfile in container agents#2139Hweinstock wants to merge 1 commit into
Hweinstock wants to merge 1 commit into
Conversation
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Clean, targeted fix for the missing Dockerfile in bundled/embedded container templates. Renaming to Dockerfile.template and generalizing renderName to strip a trailing .template for non-ignore files is a natural extension of the existing pattern.
Some things I checked and confirmed are fine:
- The generalized
.templatestripping inrenderNameonly affects files loaded viaFsTreeNode.fromAssetSource. The only other callers today aretemplates/hello-world-python-container,templates/hello-world-python,templates/strands-http-python, andcdk/— none of them contain non-ignore.templatefiles that would be adversely renamed. templates/shared/env.local.templateis read viaassetSource.readdirectly, not throughfromAssetSource, so its name is unaffected.- The
*ignore.templatebranch runs first and early-returns, sogitignore.template/npmignore.template/dockerignore.templatestill resolve to their dotfile forms. - New test uses a real in-memory
AssetSourcerather than mocks — matches the codebase convention. - Bug fix (not a new feature), so no telemetry expected.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2139 +/- ##
=========================================
Coverage 97.19% 97.19%
=========================================
Files 471 471
Lines 28731 28733 +2
=========================================
+ Hits 27925 27927 +2
Misses 806 806 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Hweinstock
marked this pull request as ready for review
August 28, 2026 02:36
This was referenced Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dev fails when using the binary on container based agents.
container based agents (currently only hello-world-python-container) are unable to find the dockerfile in dev mode. This is because the Dockerfile is never rendered into the project.
The root cause is that assets are embedded with the following pattern:
agentcore-cli/scripts/build.ts
Line 149 in fadad5a
from
agentcore-cli/scripts/build.ts
Line 13 in fadad5a
But when a file doesn't have an extension, its still rendered as
[dir]/[name].ex. Dockerfile -->Dockerfile.so we can't find it.Solution
DockerfiletoDockerfile.template.templateso thatDockerfileis rendered.Verification