Optimize worker startup
When workers start up, docker-machine runs a couple of commands on the machine, e.g. a generic yum update
and curl | sh
for the docker install script if the docker executable cannot be found. This can all take quite a long time.
It should be possible to speed that up by messing with the cloudinit user script, e.g. by adding in there
- disable most repos
- install moby
- disable all repos
From the console logs of a build worker, there is quite a bit of a delay until docker comes online:
[ 18.767470] EXT4-fs (nvme1n1): mounted filesystem with ordered data mode. Quota mode: none.
...
[ 167.760321] docker0: port 1(vethb6d95af) entered blocking state
(the first line is the root fs mount, last line is the first obvious line from docker)
Edited by Michael Hofmann