This repository has been archived by the owner on Jun 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Dockerfile improvements #11
Merged
mcdonnnj
merged 8 commits into
improvement/modernize_project
from
improvement/update_Dockerfile
Sep 12, 2022
Merged
Dockerfile improvements #11
mcdonnnj
merged 8 commits into
improvement/modernize_project
from
improvement/update_Dockerfile
Sep 12, 2022
Conversation
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
It's better to combine related commands when possible to both logically group them and to consolidate Docker image layers.
Rather than making the script executable and using it as an entrypoint we instead call python3 to invoke the script as the entrypoint.
mcdonnnj
added
the
improvement
This issue or pull request will add or improve functionality, maintainability, or ease of use
label
Sep 9, 2022
jsf9k
reviewed
Sep 9, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These all look like good improvements to me.
Do any of the CISA_USER
cleanup items (or anything else) need to be backported to the skeleton?
dav3r
approved these changes
Sep 9, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍
Base default values on the user and uid instead of a mix of values.
Instead of manually running a chown command to ensure ownership we instead assign ownership as part of copying the files into the image.
Since they are managed in the Dockerfile we add version pins for the pip, setuptools, and wheel packages.
Cleanup, correct, and streamline the commenting in the Dockerfile.
Instead of relying on the pip command we instead call it as a module from the python3 command. This ensures that pip is installing packages in the same Python version/environment as we use to run the `email-update.py` script.
mcdonnnj
force-pushed
the
improvement/update_Dockerfile
branch
from
September 12, 2022 04:50
312f295
to
2d59ea9
Compare
I've been mulling a number of updates to cisagov/skeleton-docker and those changes are included in that list. You should see some PRs start to roll in this week to build a large update to that skeleton. |
jsf9k
approved these changes
Sep 12, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
improvement
This issue or pull request will add or improve functionality, maintainability, or ease of use
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗣 Description
This pull request updates the
Dockerfile
for the project to follow Docker and Python best practices. There's also some cleanup around creating the unprivileged user.💭 Motivation and context
We always try to follow best practices for the languages and tools we use and so this project should be updated to align with that goal.
🧪 Testing
Automated tests pass. I can build a local image and successfully invoke the image with
--help
as an argument.✅ Pre-approval checklist