Skip to content

Support custom dockerfile names #3829

@jeshan

Description

@jeshan

🚀 Feature Request

General Information

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Description

I have a project where multiple dockerfiles have the same build context. In this case, it would be nice to be able to pass in the dockerfile name. (I'm taking about the -f parameter in docker build)

Proposed Solution

In the prepareContainerAsset method,

const baseCommand = [
'docker', 'build',
...buildArgs,
'--tag', latest,
contextPath
];

it's missing the -f parameter which could default to something like $path/Dockerfile.

Environment

  • CDK CLI Version: 1.6.0
  • Module Version:
  • OS: all
  • Language: all

Other information

Similar feature request: #3342 where a custom build context is being requested.

Metadata

Metadata

Assignees

Labels

@aws-cdk/assetsRelated to the @aws-cdk/assets packageeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.md

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions