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

Use the full path for source container images #187

Conversation

mcdonnnj
Copy link
Member

🗣 Description

This pull request updates the image used in the FROM instruction of the Dockerfile to use the full path for Docker Hub sourced container images. It also updates the tag for the image to specify the version of Alpine Linux.

Note

I am creating this pull request against a branch that will represent a larger body of work. This branch will later have a pull request against develop once the body of work is completed.

💭 Motivation and context

Using the full image name will ensure that we pull exactly the image we mean to when building. This is important because some operating systems (such as Red Hat Enterprise Linux) are configured with a default registry other than Docker Hub. It will also make Dockerfile configurations consistent if a non-Docker Hub sourced image is used (such as from a GitHub Container Registry package). Lastly we specify the version of Alpine Linux used to ensure build reproducibility.

🧪 Testing

Automated tests pass.

✅ Pre-approval 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 helps ensure that when a Docker image is built the expacted source
image is used regardless of what repository is configured as the
default on the host system. It also makes our Dockerfiles more
seamlessly convertible to using the GitHub Container Registry or any
other Open Container Initiative (OCI) compatible registry.
Use the full tag that includes the Alpine Linux version to ensure the
pulled image is always the same.
@mcdonnnj mcdonnnj added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Feb 20, 2024
@mcdonnnj mcdonnnj self-assigned this Feb 20, 2024
@jsf9k jsf9k requested a review from a team February 20, 2024 14:19
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

Approved, with one question/suggestion.

Dockerfile Show resolved Hide resolved
@mcdonnnj mcdonnnj merged commit ce1247a into improvement/update_Dockerfile_configuration Feb 20, 2024
16 checks passed
@mcdonnnj mcdonnnj deleted the improvement/use_full_image_source branch February 20, 2024 14:56
cisagovbot pushed a commit that referenced this pull request Sep 25, 2024
Use an Action to install Packer in our GitHub Actions workflows
mcdonnnj added a commit that referenced this pull request Dec 6, 2024
Use the full path for source container images
mcdonnnj added a commit that referenced this pull request Dec 6, 2024
Use the full path for source container images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Development

Successfully merging this pull request may close these issues.

3 participants