gpt4 book ai didi

docker - RUN命令抛出 “not found”

转载 作者:行者123 更新时间:2023-12-02 19:22:38 26 4
gpt4 key购买 nike

我有Docker文件:

FROM ubuntu:18.04
COPY mylib/src /usr/src
WORKDIR /usr/src
RUN chmod +x configure.sh
RUN ls -l # it display all files, included configure.sh
RUN ./configure.sh # error there

回声:
RUN ls -l
---> Running in d9ba6b10ed2a
total 604
...
-rwxr-xr-x 1 root root 91 Oct 28 07:30 configure.sh
...
RUN ./configure.sh
---> Running in 2e3e8fdca28e
/bin/sh: 1: ./configure.sh: not found
The command '/bin/sh -c ./configure.sh' returned a non-zero code: 127

文件configure.sh存在,但是发生错误:找不到

我仅在Windows PC上有此问题。

最佳答案

Okaaaay ...问题出在Windows样式的行分隔符中。我在configure.sh中将CRLF更改为LF,它可以工作!

关于docker - RUN命令抛出 “not found”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58623721/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com