standard_init_linux.go:207: exec user process caused "no such file or directory"


運行docker容器異常中止,使用docker logs CONTAINER_ID查看異常信息如下:standard_init_linux.go:207: exec user process caused "no such file or directory" 

這是dos字符與unix字符的問題,我使用的windows 環境里 visual studio 編寫的 shell 腳本 默認是以DOS文本格式來創建的,所以才導致這樣的問題。

解決方法:

使用 Notepad++.執行一個批量的替換 :

  1. Menu: Search -> Find in Files...
  2. Directory = the directory you want to be converted to Unix format, recursively. E.g., C:\MyDir
  3. Find what = \r\n
  4. Replace with = \n
  5. Search Mode = Extended
  6. Press "Replace in Files"


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM