Skip to content

minor improvements in dockerfile#23650

Open
shashankNandigama wants to merge 2 commits into
mainfrom
shashank/update-dockerfile
Open

minor improvements in dockerfile#23650
shashankNandigama wants to merge 2 commits into
mainfrom
shashank/update-dockerfile

Conversation

@shashankNandigama

@shashankNandigama shashankNandigama commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

Merge a few docker image layers and minor updates following best practices.

Testing & Reproduction steps

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

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.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

Go Test Coverage: 62.5%

See the workflow run for the full per-package breakdown and downloadable HTML report.

@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.37%. Comparing base (c2cc6a1) to head (8818531).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shashankNandigama shashankNandigama added the backport/all Apply backports for all active releases per .release/versions.hcl label Jun 11, 2026
@shashankNandigama shashankNandigama marked this pull request as ready for review June 11, 2026 07:16
@shashankNandigama shashankNandigama requested review from a team as code owners June 11, 2026 07:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 RUN steps (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 curl from 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.

Comment thread Dockerfile

# 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.
Comment thread Dockerfile
# 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
Comment thread Dockerfile

# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/all Apply backports for all active releases per .release/versions.hcl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants