1

假设我有Dockerfile这样的:

FROM <some image> as base
COPY src /src
RUN <build command>

FROM base as test
RUN <test command>

FROM base as lint
RUN <lint command>

FROM base as <you get the idea>
RUN <test command>

FROM <slim-image> as production
COPY --from=base

我想要一个使用 BuildKit运行所有这些目标的命令。

有没有简单的方法,还是我必须编写脚本?

4

0 回答 0