minor improvements in dockerfile#23650
Open
shashankNandigama wants to merge 2 commits into
Open
Conversation
Go Test Coverage: 62.5%See the workflow run for the full per-package breakdown and downloadable HTML report. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23650 +/- ##
==========================================
- Coverage 65.55% 61.37% -4.19%
==========================================
Files 944 840 -104
Lines 114480 104643 -9837
==========================================
- Hits 75049 64221 -10828
- Misses 32434 34301 +1867
+ Partials 6997 6121 -876 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
806b651 to
dc6587e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request makes small Dockerfile best-practice updates intended to reduce image layers and clean up build steps for the Consul container images.
Changes:
- Merge related
RUNsteps (directory setup +nsswitch.conf) to reduce layers across multiple build targets. - Standardize multi-stage
FROM ... AS ...syntax casing. - Adjust Alpine package installation to avoid installing
curlfrom stable before pinning/upgrading it from Alpine edge.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Dockerfile | Merges RUN layers for filesystem + nsswitch.conf setup, standardizes AS, and refines package install steps. |
| .changelog/23650.txt | Adds a release note entry describing the Dockerfile layer reduction and best-practice updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # set up nsswitch.conf for Go's "netgo" implementation which is used by Consul, | ||
| # Also set up nsswitch.conf for Go's "netgo" implementation which is used by Consul, | ||
| # otherwise DNS supercedes the container's hosts file, which we don't want. |
| # otherwise DNS supercedes the container's hosts file, which we don't want. | ||
| RUN test -e /etc/nsswitch.conf || echo 'hosts: files dns' > /etc/nsswitch.conf | ||
| # Set up the data and config directories, and nsswitch.conf for Go's "netgo" | ||
| # implementation which is used by Consul, otherwise DNS supercedes the |
|
|
||
| # set up nsswitch.conf for Go's "netgo" implementation which is used by Consul, | ||
| # Also set up nsswitch.conf for Go's "netgo" implementation which is used by Consul, | ||
| # otherwise DNS supercedes the container's hosts file, which we don't want. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Merge a few docker image layers and minor updates following best practices.
Testing & Reproduction steps
Links
PR Checklist
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.