2 個答案
- 最新
- 最多得票
- 最多評論
0
Use aws-ecr-assets cdk module
import { DockerImageAsset } from '@aws-cdk/aws-ecr-assets';
const asset = new DockerImageAsset(this, 'MyBuildImage', {
directory: path.join(__dirname, 'my-image'),
buildArgs: {
HTTP_PROXY: 'http://10.20.30.2:1234',
},
invalidation: {
buildArgs: false,
},
});
The directory my-image must include a Dockerfile.
This will instruct the toolkit to build a Docker image from my-image, push it to an Amazon ECR repository and wire the name of the repository as CloudFormation parameters to your stack.
已回答 2 年前
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前