2 Answers
- Newest
- Most votes
- Most comments
1
Hello.
Even if I set "sudo" in the command set in cron, it fails to execute?
If you run it as the root user, it should generally run successfully.
To troubleshoot, start by enabling sudo.
https://stackoverflow.com/questions/70099692/crontab-sudo-docker-permission-denied
0
When you run docker commands interactively, your shell session has access to the Docker socket (usually docker.sock) because your user is in the docker group. However, cron jobs run in a minimal environment without loading group memberships the same way.
For a quick fix, try to run the cron job as root:
sudo crontab -e
answered 2 months ago
Relevant content
- asked 4 years ago
