Runner Entrypoint: fix daemon.json (#1409)

* Runner Entrypoint: fix daemon.json

Do not owerwrite daemon.json if it already exists.
Usage: custom images, which are using public image as source.

* Update runner/startup.sh

Co-authored-by: Callum Tait <[email protected]>

Co-authored-by: Callum Tait <[email protected]>
This commit is contained in:
Vladyslav Miletskyi
2022-06-30 11:03:12 +09:00
committed by GitHub
co-authored by Callum Tait
parent 736126b793
commit 2fe6adf5b7
+3 -1
View File
@@ -20,7 +20,9 @@ function wait_for_process () {
sudo /bin/bash <<SCRIPT
mkdir -p /etc/docker
echo "{}" > /etc/docker/daemon.json
if [ ! -f /etc/docker/daemon.json ]; then
echo "{}" > /etc/docker/daemon.json
fi
if [ -n "${MTU}" ]; then
jq ".\"mtu\" = ${MTU}" /etc/docker/daemon.json > /tmp/.daemon.json && mv /tmp/.daemon.json /etc/docker/daemon.json