Platform
Docker
Query
f4a6bcd3-e231-4acf-993c-aa027be50d2e
Description
In long RUN commands there sometimes exists cds in the middle of the Instruction to change a directory. It is not helpful to replace such a cd with a WORKDIR instruction as this would create an additional layer. Therefore only cds that are at the beginning of a RUN instruction should be reported.
Example
The official docker image for fluentd uses such a construct in the Dockerfile for its debian image: https://github.com/fluent/fluentd-docker-image/blob/a9e4cee765c7aaf7876d6fe3282aa565dbcdc2a4/v1.14/debian/Dockerfile