我有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上有此问题。
答案 0 :(得分:1)
Okaaaay ...问题出在Windows风格的行分隔符中。我在configure.sh中将CRLF更改为LF,它可以正常工作!