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 <15716903+toast-gear@users.noreply.github.com>

Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com>
This commit is contained in:
Vladyslav Miletskyi 2022-06-30 04:03:12 +02:00 committed by GitHub
parent 736126b793
commit 2fe6adf5b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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