End of working. Everything still WIP

This commit is contained in:
BlueFox 2024-09-21 23:33:47 +02:00
parent 6c471a6cac
commit 619fd21538
3 changed files with 27 additions and 0 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM alpine
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
WORKDIR /
RUN apk update --no-cache && \
apk add --no-cache git && \
adduser -g cronuser -s /bin/sh -H -D cronuser && \
mkdir crond logs && \
touch logs/crond.log logs/puller.log && \
chown cronuser logs -R && \
echo $'#!/bin/sh\ncd /to-pull && git pull' > puller.sh && \
echo $'* * * * * cronuser /puller.sh\n' > crond/cronuser && \
chmod +x puller.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["crond", "-f", "-c", "crond"]

5
docker-compose.yaml Normal file
View File

@ -0,0 +1,5 @@
services:
docker-cron-git-pull:
image: testing
volumes:
- ./logs:/logs

3
docker-entrypoint.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash