首页 > 解决方案 > 使命令在 RHEL 中失败,但在 ubuntu 中通过

问题描述

在 red hat linux 上构建Service-Catalogmake映像时遇到了奇怪的问题,在运行以下错误后发生了以下错误,而make在 ubuntu 上同样可以正常工作。以下是错误

sed "s/GO_VERSION/1.12/g" < build/build-image/Dockerfile | \
  docker build -t scbuildimage -f - .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/go_projects/src/github.com/kubernetes-sigs/service-catalog/-: no such file or directory
make: *** [.scBuildImage] Error 1

执行以下行时失败。

.scBuildImage: build/build-image/Dockerfile $$(shell sh -c "docker inspect scbuildimage" > /dev/null 2>&1 || echo .forceIt)
    mkdir -p .cache
    mkdir -p .pkg
    sed "s/GO_VERSION/$(GO_VERSION)/g" < build/build-image/Dockerfile | \
      docker build -t scbuildimage -f - .
    touch $@

标签: linuxmakefilecmakecentos

解决方案


推荐阅读