Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin the Dependencies Used #29

Merged
merged 6 commits into from
Oct 7, 2021
Merged

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Oct 4, 2021

🗣 Description

This PR pins the dependencies used for this Docker image. This includes the Docker image it is built on as well as the Python packages it needs to function. In addition installation of packages was configured to perform no caching.

💭 Motivation and context

Creating repeatable Docker image builds is a good strategy to ensure you are not blindsided by changes. This resolves #26 toward that end. The caching changes also shaved a whole 11MiB off the generated size (that's a savings of 3.5%!).

🧪 Testing

Automated tests pass and I was able to build an image successfully using this configuration.

✅ Checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

This adds a version pin for the certbot/dns-route53 image using the latest
released version.
This adds a version pin for the `python3` package installed as well as adding
the `--no-cache` option to reduce the size of generated images.
Pin the version of `pip` that is installed in the image. Replace the
`--upgrade` flag with the `--no-cache-dir` flag since we are installing a
specific version and to reduce the size of the resulting image.
Add the `setuptools` and `wheel` packages at pinned versions to the Docker
image. These are common installs for our Python projects and we should
ensure they are pinned to specific versions.
Add version pinning for the remaining Python packages, break their installation
into its own step, and switch the `--upgrade` flag for the `--no-cache-dir`
flag.
@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use dependencies Pull requests that update a dependency file hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation labels Oct 4, 2021
@mcdonnnj mcdonnnj self-assigned this Oct 4, 2021
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin it to win it! 📌

@mcdonnnj mcdonnnj merged commit 887d96d into develop Oct 7, 2021
@mcdonnnj mcdonnnj deleted the improvement/pin_dependencies branch October 7, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pin Dockerfile Dependencies
3 participants