Skip to content

feat(phase-2): add jq and yq to rc docker image#44

Closed
overtrue wants to merge 2 commits intomainfrom
fix/issue-43-add-jq-yq
Closed

feat(phase-2): add jq and yq to rc docker image#44
overtrue wants to merge 2 commits intomainfrom
fix/issue-43-add-jq-yq

Conversation

@overtrue
Copy link
Contributor

@overtrue overtrue commented Mar 9, 2026

Summary

  • install jq and yq in the runtime stage of the Docker image
  • add a regression test to enforce jq/yq presence in the runtime apk add line

Issue

Closes #43

Root Cause

The runtime image only installed ca-certificates, so jq and yq were unavailable in rustfs/rc:latest containers.

Verification

Reproduction (before fix, published latest image)

docker run --rm --entrypoint sh rustfs/rc:latest -lc 'command -v jq >/dev/null 2>&1 || echo jq-missing; command -v yq >/dev/null 2>&1 || echo yq-missing'

Observed:

  • jq-missing
  • yq-missing

After fix (branch image)

docker build -t rustfs-rc:issue-43 .
docker run --rm --entrypoint sh rustfs-rc:issue-43 -lc 'jq --version && yq --version'

Observed:

  • jq-1.8.1
  • yq ... v4.49.2

Quality gates

  • cargo fmt --all
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

All passed.

Additional scan for similar issues

Searched for other runtime package install points and related Docker image definitions; no additional missing jq/yq installation locations were found.

Copilot AI review requested due to automatic review settings March 9, 2026 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds commonly requested JSON/YAML tooling to the rustfs/rc runtime container image and introduces a contract test to prevent those tools from being removed unintentionally in future Dockerfile edits (closes #43).

Changes:

  • Install jq and yq in the Docker runtime stage via apk add.
  • Add a CLI integration test that inspects the root Dockerfile to enforce presence of jq/yq in the runtime package install.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Dockerfile Adds jq and yq to the runtime-stage apk add invocation.
crates/cli/tests/dockerfile_runtime_tools.rs Adds a contract test to detect regressions in runtime-tool availability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overtrue overtrue closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Could we add jq/yq to the image?

2 participants