Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Cron running twice #135

Open
s3dse opened this issue Jul 12, 2022 · 0 comments
Open

Cron running twice #135

s3dse opened this issue Jul 12, 2022 · 0 comments

Comments

@s3dse
Copy link

s3dse commented Jul 12, 2022

When I set the crond command to debug crond -s /var/spool/cron/crontabs -f -d -l 8 in src/docker/conf/supervisord.conf the logs show that the mirror script is run twice: once for user root and once for user mirror. Is this behaviour intended?

I can confirm that the user mirror is not necessary for the setup. I build the image without the user mirror and the cron is running only for user root. The files are served the same way as before. I also deployed the helm chart to k8s and can confirm that it works, too. I can target the k8s mirror when using dependency-check without any issues.

From the Dockerfile (line 24-33):

# obsolete # ENV user=mirror

RUN apk update                                               && \
    apk add --no-cache openjdk8-jre dcron nss supervisor     && \
    # obsolete # addgroup -S $user                           && \
    # obsolete # adduser -S $user -G $user                   && \
    mkdir -p /tmp/nvd                                        && \
    # obsolete # chown -R $user:$user /tmp/nvd               && \
    # obsolete # chown -R $user:$user /usr/local/apache2/htdocs   && \
    rm -v /usr/local/apache2/htdocs/index.html

From src/docker/conf/supervisord.conf (line 17-23):

[program:initialize_htdocs]
command=/mirror.sh
autorestart=false
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
# obsolete # user=mirror
@s3dse s3dse changed the title Cron not running Cron running twice Jul 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant