mirror of
https://github.com/willfarrell/docker-crontab.git
synced 2025-04-06 15:05:10 +02:00
Compare commits
4 Commits
a87292bd6c
...
176cb2e29c
Author | SHA1 | Date | |
---|---|---|---|
|
176cb2e29c | ||
|
799ccc8edc | ||
|
18880befdb | ||
|
1a540df103 |
@ -47,11 +47,8 @@ RUN apk update --quiet && \
|
||||
tini \
|
||||
wget && \
|
||||
rm /var/cache/apk/* && \
|
||||
mkdir -p ${HOME_DIR}/jobs && \
|
||||
rm -rf /etc/periodic /etc/crontabs/root && \
|
||||
adduser -S docker -D
|
||||
|
||||
USER docker
|
||||
mkdir -p ${HOME_DIR}/jobs
|
||||
|
||||
COPY --from=builder /usr/bin/rq/rq /usr/local/bin
|
||||
COPY entrypoint.sh /
|
||||
|
@ -4,12 +4,10 @@ set -e
|
||||
|
||||
DOCKER_SOCK=/var/run/docker.sock
|
||||
CRONTAB_FILE=/etc/crontabs/docker
|
||||
LOG_DIR=/var/log/crontab
|
||||
|
||||
if [ -z "${HOME_DIR}" ] && [ -n "${TEST_MODE}" ]; then
|
||||
HOME_DIR=/tmp/crontab-docker-testing
|
||||
CRONTAB_FILE=${HOME_DIR}/test
|
||||
LOG_DIR=${HOME_DIR}/crontab
|
||||
elif [ -z "${HOME_DIR}" ]; then
|
||||
echo "HOME_DIR not set."
|
||||
exit 1
|
||||
@ -22,12 +20,6 @@ if [ -z "${DOCKER_HOST}" ] && [ -a "${DOCKER_PORT_2375_TCP}" ]; then
|
||||
export DOCKER_HOST="tcp://docker:2375"
|
||||
fi
|
||||
|
||||
if [ "${LOG_FILE}" == "" ]; then
|
||||
LOG_FILE=${LOG_DIR}/jobs.log
|
||||
mkdir -p "${LOG_DIR}"
|
||||
touch "${LOG_FILE}"
|
||||
fi
|
||||
|
||||
normalize_config() {
|
||||
JSON_CONFIG={}
|
||||
if [ -f "${HOME_DIR}/config.json" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user