cisagov / cyhy-core

Core code for Cyber Hygiene (CyHy)
Other
7 stars 9 forks source link

Add Requirements File for Docker Python Packages #59

Closed mcdonnnj closed 3 years ago

mcdonnnj commented 3 years ago

🗣 Description

This PR adds a requirements-cyhy_ops.txt requirements file to define a list of Python packages that should be included in a created Docker image for the CyHy team. While I was here I did a little bit of Dockerfile cleanup to reduce the created image size and to better mimic how this package is installed in the production environment.

The helper script generate_cyhy_docker_image.sh was updated to allow a license key for MaxMind's GeoIP2 databases to be passed instead of relying on access to AWS SSM.

Lastly I cleaned up the README by checking it with markdownlint while I was updating the examples for the helper script.

💭 Motivation and context

We received a request from the CyHy team to include additional packages in their Docker image for some internal development efforts. A separate file under version control to manage their Python packages seemed like the best approach to solve this need. The helper script was updated so we can provide them with their own MaxMind license key and they can self-serve Docker images if they need to adjust the configuration or perform testing. Ideally they would submit a PR for any long-term changes so it is appropriately tracked.

🧪 Testing

I confirmed that the image builds correctly, the additional packages are installed in the image's Python environment, and that a cursory check of cyhy-core commands work as expected.

✅ Checklist

mcdonnnj commented 3 years ago

I am holding off on merging this until I can get user acceptance from the CyHy team.

mcdonnnj commented 3 years ago

I'm giving through Wednesday for any feedback for this change from the CyHy team. Barring any complaints/issues, I will merge it Wednesday afternoon.

mcdonnnj commented 3 years ago

I haven't heard any issues about this PR, so I'm going to go ahead and merge.