Dockerfile 不缓存特定的 RUN 步骤

Jon*_*Jon 6 docker dockerfile

我想知道如何指定不缓存的步骤Dockerfile

在这个例子中,我想缓存npm install但不想缓存newman run。我可以在这个范围内做到这一点Dockerfile吗?

FROM postman/newman
RUN npm install -g newman-reporter-teamcity
COPY . /etc/newman

# Do not cache
RUN newman run collections.json -x --delay-request 10 -r teamcity
Run Code Online (Sandbox Code Playgroud)