Skip to content

fedramp(image): apt-get upgrade in dependencies stage#2

Open
geekshiv-spotdraft wants to merge 1 commit into
masterfrom
fedramp-2026
Open

fedramp(image): apt-get upgrade in dependencies stage#2
geekshiv-spotdraft wants to merge 1 commit into
masterfrom
fedramp-2026

Conversation

@geekshiv-spotdraft

@geekshiv-spotdraft geekshiv-spotdraft commented Jun 8, 2026

Copy link
Copy Markdown

User description

Summary

The runtime stage already runs `apt-get update && apt-get upgrade -y`. This PR propagates the same upgrade into the dependencies stage so the JDK / gdal / tesseract / curl install layer also picks up Ubuntu jammy security backports during `docker build`.

Zero breaking-change risk — only DEB_REV / DEB_PATCH backports get applied.

Out of scope

  • `cxf-core 3.5.4 -> 3.5.5` (PATCH) lives inside `tika-server.jar`. Fixing it requires bumping `TIKA_VERSION` (1.28.4 is the last 1.x line; 2.x is a major upstream change). Defer to a dedicated Tika-rebase PR.

Test plan

  • `docker build .` succeeds.
  • Tika server starts and `/version` returns 1.28.4.

Made with Cursor


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Add apt-get upgrade to the dependencies stage so the JDK/GDAL/Tesseract/Curl install layer benefits from Ubuntu jammy security backports during docker builds. Ensure the container stages align by matching the runtime stage’s package freshness expectations.

Latest Contributors(2)
UserCommitDate
shivanshu@spotdraft.comfedramp(image): apt-ge...June 08, 2026
dheerajmavUpdate DockerfileAugust 30, 2023
Review this PR on Baz | Customize your next review

The runtime stage already runs 'apt-get update && apt-get upgrade -y'.
This propagates the same upgrade into the dependencies stage so the
JDK / gdal / tesseract / curl install layer gets Ubuntu jammy security
backports as well.

Note: cxf-core 3.5.4 -> 3.5.5 (PATCH) is bundled inside tika-server.jar
and cannot be patched from the Dockerfile alone — it requires bumping
TIKA_VERSION (a major upstream change) and is intentionally out of
scope for this 0-breaking-risk PR.
Comment thread Dockerfile
Comment on lines +11 to 12
RUN DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install openjdk-17-jre-headless gdal-bin tesseract-ocr \
tesseract-ocr-eng tesseract-ocr-ita tesseract-ocr-fra tesseract-ocr-spa tesseract-ocr-deu curl

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

dependencies runs apt-get upgrade/install without refreshing package lists, so cached base layers can leave stale metadata here — should we add apt-get update to this RUN first?

Severity web_search

Want Baz to fix this for you? Activate Fixer

Fix in Cursor

Prompt for AI Agents
Before applying, verify this suggestion against the current code. In Dockerfile around
lines 11-12 in the `dependencies` stage, the `RUN DEBIAN_FRONTEND=noninteractive apt-get
-y upgrade && ... apt-get -y install ...` runs without an `apt-get update`, relying on
cached apt lists from the `base` stage. Fix this by adding `apt-get update` in the same
RUN command (or otherwise refreshing `/var/lib/apt/lists`) before `upgrade` and
`install`, and keep it in a single layer to avoid stale metadata. Also consider cleaning
apt lists afterward (e.g., removing `/var/lib/apt/lists/*`) to prevent bloating the
image.

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.

1 participant