Implemented docker-entrypoint.sh and moved some contents from Dockerfile into the docker-entrypoint.sh script
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -5,15 +5,8 @@ LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
|
||||
|
||||
WORKDIR /
|
||||
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
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
|
||||
apk add --no-cache git
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["crond", "-f", "-c", "crond"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
Reference in New Issue
Block a user