vasil001
vasil001

Reputation: 2833

Can AWS CodeBuild build two Docker Images simultaneously?

I have two Dockerfiles. In Cloudformation I want CodeBuild to build two images from the two Dockerfiles. I might need two different buildspec files for that, and one CodeBuild. Is this possible?

Upvotes: 1

Views: 1391

Answers (1)

Marcin
Marcin

Reputation: 238647

Yes you can do it. You can override default buildspec.yml when you run your build. Thus you can have a single build project which will take different buildspec.yml files.

To do this, in AWS CLI, you can use --buildspec-override option:

A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.

Upvotes: 2

Related Questions