leshikus / gh-runner Goto Github PK
View Code? Open in Web Editor NEWScripts which create a docker container for a github runner
Scripts which create a docker container for a github runner
If you change your script to use a Docker volume, then the script can be used to restart a runner by different users.
This overwrites other options that present in the configuration file, such as auths
key, so users have to login to all Docker registries again. If the script replaces ~/.docker/config.json to set HTTP/HTTPS proxy in the container, then there are two better options:
--env HTTP_PROXY
and so on)jq
to create/update the existing file in place, for example:[[ -f ~/.docker/config.json ]] || (echo "{}" > ~/.docker/config.json)
tmp="$(mktemp)"
jq ".proxies.default = {\"httpProxy\": \"$http_proxy\", \"httpsProxy\": \"$https_proxy\", \"noProxy\": \"$no_proxy\"}" ~/.docker/config.json > "$tmp"
mv "$tmp" ~/.docker/config.json
Every time I run the script there is a forked tail
process keeps running in the background:
tail -f /home/user/.config/gh-runner/intel-sandbox.x1.test-runner/log
After N runs there are N tail
processes running.
The scripts mounts Vagrant home to /runner/.vagrant.d
:
mount_vagrant="-v $agent_dir/vagrant:/runner/.vagrant.d -v /var/run/libvirt/:/var/run/libvirt/"
The mount point needs to be /.vagrant.d
, since VAGRANT_HOME is set to that value.
mount_vagrant="-v $agent_dir/vagrant:/.vagrant.d -v /var/run/libvirt/:/var/run/libvirt/"
I've noticed that script mounts $agent_dir/vagrant
to /runner/.vagrant.d
. That means that every runner will need to download all vagrant boxes. Also if we want to use a custom vagrant box, then we have to distribute such box across all runners on all hosts, rather than once per host.
While this is not a big issue at the moment, we need to find a good way to distribute custom vagrant boxes to all runners.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.