Skip to content

Instantly share code, notes, and snippets.

@jc1518
Created October 29, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jc1518/6d6bd01e99b0a074306c6e18c1f7c508 to your computer and use it in GitHub Desktop.
Save jc1518/6d6bd01e99b0a074306c6e18c1f7c508 to your computer and use it in GitHub Desktop.
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