Compare commits

...

5 Commits

Author SHA1 Message Date
Robert Wlodarczyk
8672e1e276
Merge 176cb2e29ce3028f5948dca597a9b7ea576785c5 into be97512ec2241f362d7d254eb213053214850655 2025-01-05 19:06:07 +00:00
Robert Wlodarczyk
176cb2e29c fix: move back to root user to debug permissions more completely. 2025-01-05 11:05:58 -08:00
Robert Wlodarczyk
799ccc8edc fix: permissions for /opt/crontab. 2025-01-05 10:58:49 -08:00
Robert Wlodarczyk
18880befdb fix: LOG_DIR is not used anywhere, remove it. 2025-01-05 10:52:44 -08:00
Robert Wlodarczyk
1a540df103 fix: make /var/log/crontab writeable for everyone. 2025-01-05 10:46:14 -08:00
2 changed files with 1 additions and 12 deletions

View File

@ -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 /

View File

@ -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