myoung34/ephemeral-github-actions-runner:latest missing
na-jakobs opened this issue · comments
Hello,
The myoung34/ephemeral-github-actions-runner:latest image is missing from DockerHub.
Can you please check this out and upload the image? Or provide the source for it?
Thanks!
Do you have a typo? I dont build a myoung34/ephemeral-github-actions-runner:latest
image
Everything goes to myoung34/github-runner:latest
@myoung34 You reference this in your ephemeral documentation:
Ephemeral mode
GitHub's hosted runners are completely ephemeral. You can remove all its data without breaking all future jobs.
To achieve the same resilience in a self-hosted runner:
override the command for your runner with /ephemeral-runner.sh (which will terminate after one job executes)
don't mount a local folder into RUNNER_WORKDIR (to ensure no filesystem persistence)
run the container with --rm (to delete it after termination)
wrap the container execution in a system service that restarts (to start a fresh container after each job)
Here's an example service definition for systemd:
# Install with:
# sudo install -m 644 ephemeral-github-actions-runner.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable ephemeral-github-actions-runner
# Run with:
# sudo systemctl start ephemeral-github-actions-runner
# Stop with:
# sudo systemctl stop ephemeral-github-actions-runner
# See live logs with:
# journalctl -f -u ephemeral-github-actions-runner.service --no-hostname --no-tail
[Unit]
Description=Ephemeral GitHub Actions Runner Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=-/usr/bin/docker pull myoung34/github-runner:latest
ExecStart=/usr/bin/docker run --rm --env-file /etc/ephemeral-github-actions-runner.env --name %n myoung34/ephemeral-github-actions-runner:latest /ephemeral-runner.sh
[Install]
WantedBy=multi-user.target
Taken from the DockerHub page.
Also here: https://github.com/myoung34/docker-github-actions-runner/blob/master/README.md#ephemeral-mode
Thats a typo on the PR i missed. ill fix the documentation.
The way to add ephemeral is simply to add the env var EPHEMERAL=true
at runtime for any of the images built after that PR
@myoung34 Cool. I will use the other runner image then :) Thanks for replying so quick and keep up the good work!
Should the README be updated? With /ephemeral-runner.sh
the runner doesn't stop after a job but it works with EPHEMERAL="true"
.