You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing issues before opening this one
Expected behavior
After installing software using a package manager in the RUN command, developers should clear the cache to avoid unnecessary image sizes. The following rules all involve this logic:
DL3060: yarn cache clean missing after yarn install was run.
etc.
Actual behavior
However, when there is a cache clearing action before the installation action in the same RUN command, the detection of these rules will present False Negative.
Steps to reproduce the behavior
Just prepare the following Dockerfile and apply Hadolint on it.
From CentOS:7.0
RUN yum clean all && yum install -y git-2.0
There is no output, even though it violates DL3032.
Expected behavior
After installing software using a package manager in the RUN command, developers should clear the cache to avoid unnecessary image sizes. The following rules all involve this logic:
Actual behavior
However, when there is a cache clearing action before the installation action in the same RUN command, the detection of these rules will present False Negative.
Steps to reproduce the behavior
Just prepare the following Dockerfile and apply Hadolint on it.
From CentOS:7.0 RUN yum clean all && yum install -y git-2.0
There is no output, even though it violates DL3032.
Output of
hadolint --version
The relevant Dockerfile
There is a real-world Dockerfile here that can attest to this issue.
The text was updated successfully, but these errors were encountered: