提交 f5768402 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!29 fix incorrect references of `COPY --from`

Merge pull request !29 from zklei/copy
......@@ -123,7 +123,7 @@ func resolveCopySource(isAdd bool, rawSources []string, dest, contextDir string)
// getCopyContextDir gets the contextDir of from stage or image
func (c *cmdBuilder) getCopyContextDir(from string) (string, func(), error) {
// the "from" parameter is a stage name
if i, ok := c.stage.builder.stageAliasMap[from]; ok {
if i, ok := c.stage.builder.stageAliasMap[from]; ok && i < c.stage.position {
c.stage.builder.Logger().
Debugf("Get context dir by stage name %q, context dir %q", from, c.stage.builder.stageBuilders[i].mountpoint)
return c.stage.builder.stageBuilders[i].mountpoint, nil, nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册