Add gollum
This commit is contained in:
parent
b69ef08758
commit
0169da63b3
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2d9747dd7396b783ee72c7d0aeb74c8633ff8513
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env -S docker build . --tag=jcosmao/cron-git --network=host --file
|
||||
|
||||
# docker push jcosmao/cron-git
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
ARG UNAME=user
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
USER root
|
||||
|
||||
RUN addgroup --system --gid ${GID} ${UNAME}
|
||||
RUN adduser --system --disabled-password --home /home/${UNAME} \
|
||||
--uid ${UID} --ingroup ${UNAME} ${UNAME}
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk --no-cache add dcron libcap
|
||||
|
||||
RUN apk fix && \
|
||||
apk --no-cache --update add git git-lfs gpg less openssh patch mandoc man-pages bash && \
|
||||
git lfs install
|
||||
|
||||
RUN chown $UID:$GID /usr/sbin/crond \
|
||||
&& setcap cap_setgid=ep /usr/sbin/crond
|
||||
|
||||
COPY --chown=$UID:$GID entrypoint.sh /home/$UNAME/entrypoint.sh
|
||||
RUN chmod +x /home/$UNAME/entrypoint.sh
|
||||
|
||||
USER $UNAME
|
||||
RUN mkdir /home/$UNAME/crontabs && touch /home/$UNAME/crontabs/$UNAME
|
||||
WORKDIR /home/$UNAME
|
||||
|
||||
# install a cronjob:
|
||||
# echo SHELL=/bin/sh > ~/crontabs/user
|
||||
# echo '* * * * * my_cron' >> ~/crontabs/user
|
||||
|
||||
# crond fail to setgid if run as PID 1
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
crond -c $HOME/crontabs -f -l 8 -L /dev/stdout
|
||||
Loading…
Reference in New Issue