End of working. Everything still WIP
This commit is contained in:
parent
6c471a6cac
commit
619fd21538
19
Dockerfile
Normal file
19
Dockerfile
Normal 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
5
docker-compose.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
services:
|
||||
docker-cron-git-pull:
|
||||
image: testing
|
||||
volumes:
|
||||
- ./logs:/logs
|
3
docker-entrypoint.sh
Normal file
3
docker-entrypoint.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user