Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use Image Scanning for AWS ECR
#!/bin/bash
# Define your ECR
MY_ECR='<account>.dkr.ecr.<region>.amazonaws.com'
# Sample for scanning atlassian/jira-software:8.3
aws ecr get-login --no-include-email | bash -
aws ecr create-repository --repository-name jira --image-tag-mutability IMMUTABLE --image-scanning-configuration scanOnPush=true
docker pull atlassian/jira-software:8.3
docker tag atlassian/jira-software:8.3 ${MY_ECR}/jira:8.3
docker push ${MY_ECR}/jira:8.3
aws ecr describe-image-scan-findings --repository-name jira --image-id imageTag=8.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment