Created
October 29, 2019 10:00
-
-
Save jc1518/6d6bd01e99b0a074306c6e18c1f7c508 to your computer and use it in GitHub Desktop.
Use Image Scanning for AWS ECR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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