Why won't my docker-entrypoint.sh execute?

前端 未结 11 1047
清歌不尽
清歌不尽 2021-01-31 08:02

My ENTRYPOINT script doesn\'t execute and throws standard_init_linux.go:175: exec user process caused \"no such file or directory\". Why so?

<
11条回答
  •  不知归路
    2021-01-31 08:31

    Gosh I struggled for 2–3 hours!! Thanks to @Ryan Allen For my case it was CRLF problem. I am working on puppet manifests over ATOM for jenkins setup. Make sure if you are using ATOM or any other IDE on windows, when you take your file ( especially .sh) to unix, convert it to unix format. It worked like magic once converted. Here is what I added in my puppet file:

      exec {'dos2unix':
        path      => ['/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/puppetlabs/bin'],
        command   => 'dos2unix /dockerwork/puppet/jenkins/files/*',
        subscribe => File['/dockerwork/puppet/jenkins/files/init.sh'],
      }
    

提交回复
热议问题