-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Labels
@aws-cdk/aws-ecr-assetsRelated to AWS CDK Docker Image AssetsRelated to AWS CDK Docker Image AssetsbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp3
Description
Describe the bug
The TarballImageAsset construct fails when it is nested inside of a Stack that is also inside of a Stage. Moving that Stack outside of the Stage works around the issue.
Expected Behavior
The TarballImageAsset should push the image to ECR.
Current Behavior
The failure occurs when TarballImageAsset attempts to shell out to docker load.
[78%] fail: docker tag .dkr.ecr..amazonaws.com/cdk--container-assets--: exited with error code 1: Error parsing reference: "" is not a valid repository/tag: invalid reference format
Reproduction Steps
class MyStack extends Stack {
public MyStack(final Construct scope, final String id) {
super(scope, id);
new TarballImageAsset(
this, "image", TarballImageAssetProps.builder().tarballFile("./my-image.tar").build());
}
}
class MyStage extends Stage {
public MyStage(final Construct scope, final String id) {
super(scope, id);
new MyStack(this, "stack");
}
}Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.70.0 (build c13a0f1)
Framework Version
2.70.0
Node.js Version
v19.8.1
OS
macOS 13.2.1
Language
Java
Language Version
17.0.6
Other information
Consider sending requests to the Docker daemon without shelling out to the Docker CLI to get more descriptive errors and avoid issues like #19627.
nicolai0, tom-mi, Dreamescaper and i906
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecr-assetsRelated to AWS CDK Docker Image AssetsRelated to AWS CDK Docker Image AssetsbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp3