baseimage-docker: /etc/my_init.d/logtime.sh failed with status 127
Your sample sh with chmod +x
#In logtime.sh (make sure this file is chmod +x):
#!/bin/bash
/bin/date > /tmp/boottime.txt
RUN mkdir -p /etc/my_init.d
ADD logtime.sh /etc/my_init.d/logtime.sh
docker run -i -t kunthar/middleware /sbin/my_init -- /bin/bash
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/logtime.sh...
*** /etc/my_init.d/logtime.sh failed with status 127
*** Killing all processes...
Whenever i comment out
ADD logtime.sh /etc/my_init.d/logtime.sh
everything is fine.
This is the explanation of status 127= http://is.gd/eKCtRI I’ve used
/bin/date > /tmp/boottime.txt
but no luck.
Any comments?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 17 (4 by maintainers)
I think the problem was due to some invisible extra characters. I especially recommend ababkov’s comment here for anybody googling this problem.
Thank you for your help! 😃