cisagov / cyhy-core

Core code for Cyber Hygiene (CyHy)
Other
8 stars 10 forks source link

Improve the Docker Image Helper Script #53

Closed mcdonnnj closed 4 years ago

mcdonnnj commented 4 years ago

πŸ—£ Description

This PR updates the generate_cyhy_docker_image.sh helper script to:

  1. Pull the MaxMind GeoIP2 license key from AWS SSM's Parameter Store.
  2. Allow you to specify a custom image name without having to specify a tag.
  3. Update the output file name to reflect the image name and tag being used.
  4. Improve the way the script handles command line arguments, making it easier to add additional functionality in the future.

πŸ’­ Motivation and Context

After a team discussion I needed to change how the MaxMind license key was retrieved to reflect the way I was doing it in my local repository. Pulling directly from the Parameter Store using the AWS CLI is a better way to populate that value than how it was done previously. While I was updating the script I wanted to add the ability to specify a custom image name without needed to specify a custom tag. This necessitated rewriting the command line argument logic.

πŸ§ͺ Testing

I verified that the command line arguments work as expected.

βœ… Checklist