从安装在 Windows 上的 Ubuntu 18 执行 docker-compose up
。
返回错误
ERROR: for image Cannot start service python: OCI runtime create failed:
container_linux.go:367: starting container process caused: exec: "./start.sh":
permission denied: unknown
Dockerfile 只是
FROM scratch
ADD ubuntu-bionic-core-cloudimg-amd64-root.tar.gz /
COPY start.sh ./
RUN chmod +x ./start.sh
CMD ["./start.sh"]
答案 0 :(得分:0)
主机Ubuntu机器内部的一些东西,必须在主机Ubuntu机器内部执行以下操作(不是在docker build中)
$ chmod +x start.sh
在没有缓存的情况下重建图像并重新启动一切,它起作用了
$ docker-compose build --no-cache
$ docker-compose up