{"action":"created","issue":{"url":"https://api.github.com/repos/phusion/baseimage-docker/issues/50","labels_url":"https://api.github.com/repos/phusion/baseimage-docker/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/phusion/baseimage-docker/issues/50/comments","events_url":"https://api.github.com/repos/phusion/baseimage-docker/issues/50/events","html_url":"https://github.com/phusion/baseimage-docker/issues/50","id":31083415,"number":50,"title":"/etc/my_init.d/logtime.sh failed with status 127","user":{"login":"kunthar","id":49767,"avatar_url":"https://avatars.githubusercontent.com/u/49767?v=3","gravatar_id":"","url":"https://api.github.com/users/kunthar","html_url":"https://github.com/kunthar","followers_url":"https://api.github.com/users/kunthar/followers","following_url":"https://api.github.com/users/kunthar/following{/other_user}","gists_url":"https://api.github.com/users/kunthar/gists{/gist_id}","starred_url":"https://api.github.com/users/kunthar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunthar/subscriptions","organizations_url":"https://api.github.com/users/kunthar/orgs","repos_url":"https://api.github.com/users/kunthar/repos","events_url":"https://api.github.com/users/kunthar/events{/privacy}","received_events_url":"https://api.github.com/users/kunthar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-04-08T15:54:34Z","updated_at":"2015-05-20T07:11:35Z","closed_at":"2014-05-12T08:33:12Z","body":"Your sample sh with chmod +x\r\n```\r\n#In logtime.sh (make sure this file is chmod +x):\r\n#!/bin/bash\r\n/bin/date > /tmp/boottime.txt\r\n```\r\n--------------\r\n```\r\nRUN mkdir -p /etc/my_init.d\r\nADD logtime.sh /etc/my_init.d/logtime.sh\r\n```\r\n--------------\r\n```\r\ndocker run -i -t kunthar/middleware /sbin/my_init -- /bin/bash\r\n*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...\r\n*** Running /etc/my_init.d/logtime.sh...\r\n*** /etc/my_init.d/logtime.sh failed with status 127\r\n*** Killing all processes...\r\n```\r\n\r\nWhenever i comment out \r\n```\r\nADD logtime.sh /etc/my_init.d/logtime.sh\r\n```\r\neverything is fine. \r\n\r\nThis is the explanation of status 127= http://is.gd/eKCtRI\r\nI've used \r\n```\r\n/bin/date > /tmp/boottime.txt\r\n```\r\nbut no luck. \r\n\r\nAny comments?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/phusion/baseimage-docker/issues/comments/103785091","html_url":"https://github.com/phusion/baseimage-docker/issues/50#issuecomment-103785091","issue_url":"https://api.github.com/repos/phusion/baseimage-docker/issues/50","id":103785091,"user":{"login":"OnixGH","id":10709325,"avatar_url":"https://avatars.githubusercontent.com/u/10709325?v=3","gravatar_id":"","url":"https://api.github.com/users/OnixGH","html_url":"https://github.com/OnixGH","followers_url":"https://api.github.com/users/OnixGH/followers","following_url":"https://api.github.com/users/OnixGH/following{/other_user}","gists_url":"https://api.github.com/users/OnixGH/gists{/gist_id}","starred_url":"https://api.github.com/users/OnixGH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OnixGH/subscriptions","organizations_url":"https://api.github.com/users/OnixGH/orgs","repos_url":"https://api.github.com/users/OnixGH/repos","events_url":"https://api.github.com/users/OnixGH/events{/privacy}","received_events_url":"https://api.github.com/users/OnixGH/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T07:11:35Z","updated_at":"2015-05-20T07:11:35Z","body":"@moonbingbing try removing the first comment line of test.sh, so that it starts with `#!/bin/bash`. That works for me."}}