Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MAINTAINER david@logicalspark.com

FROM base as dependencies

RUN DEBIAN_FRONTEND=noninteractive apt-get -y install openjdk-17-jre-headless gdal-bin tesseract-ocr \
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
Comment on lines +11 to 12

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.


RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections \
Expand Down