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" linux

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

解決方法:shell

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

  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"
相關文章
相關標籤/搜索