hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

build(docker): specify user for runner stage

Open pixincreate opened this issue 9 months ago • 1 comments

Type of Change

  • [x] Bugfix
  • [ ] New feature
  • [ ] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

This PR modifies the Dockerfile to specify the user at runner stage.

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

From the security perspective, it is better to be a user rather than being a root. Closes https://github.com/juspay/hyperswitch/issues/7643

How did you test it?

build succeeded (tested by making a debug build):

image

podman build \
    --load \
    --file Dockerfile \
    --build-arg "BINARY=router" \
    --tag hyperswitch-router \
    .

Checklist

  • [ ] I formatted the code cargo +nightly fmt --all
  • [ ] I addressed lints thrown by cargo clippy
  • [x] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

pixincreate avatar Mar 26 '25 10:03 pixincreate

Review changes with  SemanticDiff

semanticdiff-com[bot] avatar Mar 26 '25 10:03 semanticdiff-com[bot]