Any ideas why the following works (the Docker container runs without errors):
FROM alpine:3.14.0
RUN apk update && \
apk --no-cache add dcron
COPY entry.sh /entry.sh
RUN chmod +x /entry.sh
CMD /entry.sh
# entry.sh
#!/bin/sh
# start cron
/usr/sbin/crond -f
While the following
FROM alpine:3.14.0
RUN apk update && \
apk --no-cache add dcron
CMD /usr/sbin/crond -f
gives me the
cnt | setpgid: Operation not permitted
cnt exited with code 1
What am I missing here?
I think that is related to alpine:3.14.0
. Check it out:
Try to update you Docker version
Looks like it has something with how Linux process group ID and session ID works (more details in credentials(7) ) and should be fixed in dcron.
At the moment dcron calls setpgid if started with -f
option :
execve()
to dcron - it doesn't work (setpgid returns EPERM for reasons explained in setpgid(2) ).UPDATE: See https://github.com/dubiousjim/dcron/issues/13
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.