aws-ecr-orb
aws-ecr-orb copied to clipboard
'context "builder" already exists' error has occurred
Orb version
8.1.2
What happened
# ...
jobs:
build-and-push-image:
executor: ecr-deploy
steps:
- setup_remote_docker
- aws-ecr/build-and-push-image:
repo: "repo1"
tag: "${CIRCLE_SHA1}"
- aws-ecr/build-and-push-image:
path: "./path2"
repo: "repo2"
tag: "${CIRCLE_SHA1}"
context "builder" already exists
error has occurred.
Expected behavior
Please stop calling docker context create builder
multiple times.
I would like to be able to specify CONTEXT
(default: builder
) .
I use splitting jobs as a workaround.
I also encountered this problem.
My yet another workaround is below:
jobs:
build-and-push-image:
executor: ecr-deploy
steps:
- setup_remote_docker
- aws-ecr/build-and-push-image:
repo: "repo1"
tag: "${CIRCLE_SHA1}"
- run:
name: remove existing Docker context
command: docker context rm -f builder
- aws-ecr/build-and-push-image:
path: "./path2"
repo: "repo2"
tag: "${CIRCLE_SHA1}"
Hey @aereal and @bouzuya,
This issue has been addressed in PR #234 . There's a check that will not create the builder
context if it already exists.
Thanks for contributing!
Best, Brian