Closed jaekunchoi closed 7 years ago
Klar doesn't use docker
at all, docker login
doesn't affect Klar. So far you need to manually generate user name (usually AWS
) and password (-p
value) using aws ecr get-login
and pass it to Klar as DOCKER_USER
and DOCKER_PASSWORD
. Seamless integration with ECR could be implemented later on.
I've added some info README
file, I hope it solves your issue. Also please update to the latest version 1.2.1
, the previous versions contain a minor bug which is critical for ECR integration.
sh "DOCKER_USER=AWS DOCKER_PASSWORD=$PASSWORD CLAIR_ADDR=$CLAIR_URL CLAIR_OUTPUT=Critical klar $ECR_REPOSITORY_URI"
faced same issue when running klar with jenkins, converting single line command into multiline, made it worked.
sh """
export DOCKER_USER=AWS
export DOCKER_PASSWORD=$PASSWORD
export CLAIR_ADDR=$CLAIR_URL
export CLAIR_OUTPUT=Critical
klar $ECR_REPOSITORY_URI
"""
It seems there is no explanation on usage with ECR.
With AWS ECR you typically use IAM Roles with EC2 instance so all we need is
aws ecr get-login
There is no need to pass in
DOCKER_USER
andDOCKER_PASSWORD
and I'm gettingAny work around here?