1
這裏是我的Dockerfile:泊塢窗集裝箱命令無法找到shell腳本
FROM debian
MAINTAINER Andrew Ford<[email protected]>
RUN apt-get update
COPY entrypoint.sh/
ENTRYPOINT ["/entrypoint.sh"]
,這裏是我的entrypoint.sh(同一目錄Dockerfile)
#!/bin/bash
echo Hello
然後我跑:
docker build --no-cache=true -t test/dockerfile-sayhello .
當我跑步時:
docker run test/dockerfile-sayhello
返回:
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: Container command '/entrypoint.sh' not found or does not exist..
我曾嘗試google搜索周圍嘗試,看看我所做的任何明顯的錯誤,但到目前爲止,我還沒有能夠識別它。也許你們中的一些可以幫助
編輯:也跑了使用chmod + X entrypoint.sh賦予權限
什麼'docker run test/dockerfile-sayhello ls -l/entrypoint'輸出?你的腳本文件是否有unix行結尾? – Matt
它返回相同的東西,是的,它確實有unix行結尾 – paperpin
嘗試使用'。/ entrypoint.sh'。 –