Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignoring /etc/crontabs/validate (non-existent user) #286

Open
mbdsv opened this issue Feb 21, 2025 · 2 comments
Open

ignoring /etc/crontabs/validate (non-existent user) #286

mbdsv opened this issue Feb 21, 2025 · 2 comments

Comments

@mbdsv
Copy link

mbdsv commented Feb 21, 2025

It seems that /validate.sh will not be called via cron.

I see in the docker logs:

ignoring /etc/crontabs/validate (non-existent user)

This user does not exist:

# id validate
id: unknown user validate

Possible solution 1: create the validate user in the Dockerfile

ENV uservalidate=validate

RUN ...
    addgroup -S "$uservalidate" && \
    adduser -S "$uservalidate" -G "$uservalidate" && \

Possible solution 2: run the validate.sh as the mirror user

add it to the mirror crontab in /etc/crontabs/mirror
remove /etc/crontabs/validate

my docker compose.yaml

---
services:
  nvdmirror:
    image: jeremylong/open-vulnerability-data-mirror:v7.2.2
    restart: unless-stopped
    environment:
      # - NVD_API_KEY=(REMOVED)
      - _JAVA_OPTIONS=-Xmx2g -XX:+UseStringDeduplication
      - DEBUG=true
    ports:
      - 9080:80
    volumes:
      - nvdmirror_data:/usr/local/apache2/htdocs
      - /etc/localtime:/etc/localtime:ro
    healthcheck:
      test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80" ]
      start_period: 40s
    logging:
      driver: json-file
      options:
        max-size: "50m"
        max-file: "10"
volumes:
  nvdmirror_data:
@jeremylong
Copy link
Owner

option 2 is the better choice.

@EugenMayer
Copy link
Contributor

EugenMayer commented Feb 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants