Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

linux - Docker OCI runtime create failed: container_linux.go:349: starting container process caused

I have been working on a project for almost a year, and this project has been working in Docker. Today I noticed that the permissions of the entire file system changed to 777 (all files "-rwxrwxrwx"). I don’t know why all this happened and I wanted to fix it.

I ran two Bash command:

find ./ -type -d exec chmod 755 {} ;
find ./ -type -f exec chmod 644 {} ;

After that I wanted to see the result and I run this command ls -l and I saw such a message Permission denied, the worst thing that could happen. I could not run a single command, and decided to get out of the container. After that the nightmare began. And now when I try to start the container again I get the following error

Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "bash": executable file not found in $PATH": unknown
Error: failed to start containers:

I do not want to think about the worst, because I can’t afford to lose this container, I really need it. My OS Ubuntu 18.04.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Adding "bash" in the Entrypoint worked for me:

ENTRYPOINT ["bash","entrypoint.prod.sh"]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...