DL3003 : Use WORKDIR instead of cd

Description

Using cd in RUN instructions is error-prone; prefer the WORKDIR instruction to change directories.

Goals

Specification

  1. Inspect each RUN instruction.
  2. Parse the executed commands.
  3. If any command is cd, emit DL3003 at that line, recommending the use of WORKDIR.

(c) 2025 Asymmetric Effort, LLC. scaldwell@asymmetric-effort.com Asymmetric Effort logo