Cron job for Git pull and Docker build
See original GitHub issueI’m a dummy when it comes to Linux, so I’d really appreciate competent advice on how to set up the following in the most efficient way possible (cron
job?) on my RasPi 4B with Raspian installed:
- In user
pi
’s home folder/GitHub/juice-shop
check-out master dropping any local changes and then pull from remote - If one or more commits without
ci skip
in the commit message were pulled - Run shell script X (which I’ll build the Docker image and push from then)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
edwardsamuel/Docker-Cron-Job-Sample - GitHub
Run Cron Job inside Docker Container To run a cron job inside a Docker container, you need to specify your cron job first...
Read more >Git auto-pull using cronjob - Stack Overflow
So I have to create tasks as the root user. The crontab entry I tried: */1 * * * * su -s /bin/sh...
Read more >Docker Cron Jobs: How to Run Cron Inside Containers
In this article, we'll walk through using the host's crontab, using cron within your containers, and separating cron from your application's ...
Read more >Cron + Docker = The Easiest Job Scheduler You'll Ever Create
Use a Docker volume, which would allow for easier updating of the schedules and/or jobs. · Create an execution log file so you...
Read more >Running A Cronjob Inside Docker Container In 5 Steps - Devtron
Create a script file(task file) · Create a cron job file · Create a docker file · Create a docker image from docker...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re right, it doesn’t need to be callable, but https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories still says “We recommend that you do not use self-hosted runners with public repositories.” - more due to risks of malicious forks, but the “Threat Model” here is just too unforeseeable to me. With a simple script that only pulls from the master branch of my own checked out repo, things should be safe pretty much all the time for my poor little RasPi.
This thread has been automatically locked because it has not had recent activity after it was closed. 🔒 Please open a new issue for regressions or related bugs.