-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
@aws-cdk/aws-ecsRelated to Amazon Elastic ContainerRelated to Amazon Elastic ContainerbugThis issue is a bug.This issue is a bug.documentationThis is a problem with documentation.This is a problem with documentation.p0
Description
I've upgraded aws-cdk and @aws-cdk/* packages from 1.28.0 to 1.30.0 and ecs.ContainerImage.fromAsset got broken.
Docker asset is defined like this:
ecs.ContainerImage.fromAsset(path.resolve(__dirname, '../../../..'), {
file: 'services/backend/Dockerfile',
buildArgs: {
//
},
});CLI output says that 1.30.0 builds docker images with command that looks like:
docker build --tag cdkasset-xxx \
--file services/backend/Dockerfile \
/Volumes/Projects/whatever/build/cdk/cdk.out/asset.xxx
And it breaks, because path services/backend/Dockerfile is relative to cdk project dir and it doesn't exist.
1.28.0 uses:
docker build --tag 942768376061.dkr.ecr.eu-central-1.amazonaws.com/aws-cdk/assets:xxx
--target production
--file cdk.out/asset.xxx/services/admin/Dockerfile
cdk.out/asset.xxx exited with error code 1
So 1.30.0 builds and tags images differently, but changelog doesn't mention it.
Downgrading back to 1.28.0 solves the problem.
Reproduction Steps
Error Log
Environment
- CLI Version : 1.30.0
- Framework Version: 1.30.0
- OS : MacOS
- Language : Typescript
Other
This is 🐛 Bug Report
misterjoshua
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecsRelated to Amazon Elastic ContainerRelated to Amazon Elastic ContainerbugThis issue is a bug.This issue is a bug.documentationThis is a problem with documentation.This is a problem with documentation.p0