我在 $PATH 中找不到可执行文件:尝试运行 golang 项目的 docker 映像时出现未知错误。以下是我的码头文件。
FROM golang:latest
LABEL maintainer = "Nisal Perera <xxx@sss.com>"
RUN mkdir -p /go/src/github.com/user/app/
COPY . /go/src/github.com/user/app/
WORKDIR /go/src/github.com/user/app/
RUN go get -u github.com/golang/dep/cmd/dep
#RUN dep init
RUN dep ensure
RUN go build
CMD ["go run main.go"]
我得到的错误如下
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "go run main.go": executable file not found in $PATH: un
known.
请帮我解决一下这个。谢谢
扬帆大鱼
尚方宝剑之说
狐的传说
相关分类