Skip to content

feat: updated dockerfile - #142

Merged
katy-scott merged 3 commits into
mainfrom
jjjermiah/dockerfile
Aug 11, 2026
Merged

katy-scott merged 3 commits into
mainfrom
jjjermiah/dockerfile

Conversation

@katy-scott

@katy-scott katy-scott commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Improved the application’s container packaging for more efficient deployments.
    • Ensured the required command-line tools are included and available in the production image.
    • Added build-time verification to confirm the packaged tools are ready to use.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The Dockerfile now uses a named build stage and a separate Python 3.11 slim runtime stage. The runtime stage copies installed packages and executables, then checks readii and imgtools availability.

Changes

Docker image build

Layer / File(s) Summary
Staged runtime image
Dockerfile
The Dockerfile names the base stage, installs readii without pip cache, copies packages and executables into the final stage, and validates readii and imgtools with --help.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a rabbit in a fresh-built crate,
Where readii and imgtools wait.
The base stage plants the seed,
The slim final stage takes what we need.
Two help checks hop in place—
A tidy image wins the race!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title identifies the Dockerfile but does not describe the main multi-stage build or minimal final image change. Describe the Dockerfile change more specifically, such as introducing a multi-stage build with a minimal final image.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jjjermiah/dockerfile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Around line 22-29: Create a dedicated non-root runtime user in the final
Docker stage, grant it access to the mounted input and output directories, and
set USER before the validation commands or CMD. Keep the existing readii and
imgtools validation commands intact while ensuring they execute under the new
user.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d0543706-a850-43cf-aaf7-5330004c3119

📥 Commits

Reviewing files that changed from the base of the PR and between 6f6ebd6 and db3fcb9.

📒 Files selected for processing (1)
  • Dockerfile

Comment thread Dockerfile
Comment on lines +22 to +29
FROM python:3.11-slim as final

COPY --from=base /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=base /usr/local/bin /usr/local/bin

# Check that the package is installed
RUN readii --help
RUN imgtools --help

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Run the final image as a non-root user.

The final stage has no USER instruction, so the runtime container runs as root. Create a dedicated user and set USER before the validation commands or CMD. Ensure mounted input and output directories are accessible to that user.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 22 - 29, Create a dedicated non-root runtime user in
the final Docker stage, grant it access to the mounted input and output
directories, and set USER before the validation commands or CMD. Keep the
existing readii and imgtools validation commands intact while ensuring they
execute under the new user.

Source: Linters/SAST tools

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.15%. Comparing base (709bcf0) to head (f4b4076).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #142   +/-   ##
=======================================
  Coverage   76.15%   76.15%           
=======================================
  Files          41       41           
  Lines        2009     2009           
=======================================
  Hits         1530     1530           
  Misses        479      479           

☔ 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.

@katy-scott
katy-scott merged commit bf99bd1 into main Aug 11, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Focus to Done in READII-2-ROQC Pipeline Aug 11, 2026
@katy-scott
katy-scott deleted the jjjermiah/dockerfile branch August 11, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants