WORKDIR uses a relative path
Part of Architecture & Best Practices, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
A relative WORKDIR depends on whatever the current directory happened to be, so the resolved path is implicit and can change between base images.
Why it matters
A relative WORKDIR resolves against whatever directory the previous instruction left the build in, which is implicit and can differ between base images. Absolute paths make the working directory unambiguous.
How to fix it
Change each relative WORKDIR to an absolute path, for example WORKDIR /app. Update any following instructions that assumed the old relative location, then confirm COPY destinations and CMD paths still line up.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo