thecodingmachine / docker-images-nodejs

A set of Node.js Docker images
MIT License
10 stars 8 forks source link

sudo: source: command not found #8

Open tinuva opened 3 years ago

tinuva commented 3 years ago

When adding a /etc/config/startup.sh file to the configuration, I get the error sudo: source: command not found

docker-compose up -d --remove-orphans && docker-compose logs -f --tail 10 | grep nodejswatch
Creating nodejswatch ... done
Attaching to nodejswatch,
nodejswatch        | sudo: source: command not found
nodejswatch        | time="2020-11-24T08:16:17Z" level=info msg="read crontab: /tmp/generated_crontab" 
nodejswatch exited with code 1

Docker compose config:

  nodejswatch:
    container_name: nodejswatch
    image: thecodingmachine/nodejs:10-apache
    environment:
      - CRON_USER_1=www-data
      - CRON_SCHEDULE_1=*/5 * * * *
      - CRON_COMMAND_1=node /var/www/html/script.js
    volumes:
      - ${USERDIR}/docker/nodejswatch/data:/var/www/html
      - ${USERDIR}/docker/nodejswatch/config/startup.sh:/etc/container/startup.sh:ro

Is there something I am doing wrong? Contents of the script doesnt matter I just get the above error.

tinuva commented 3 years ago

ok looks like using STARTUP_COMMAND_1 works so the above is not really needed, just odd that it throws that error.