Skip to content
Snippets Groups Projects
Commit d0491d41 authored by Tomáš Rebok's avatar Tomáš Rebok
Browse files

Automaticka detekce MTU a nastaveni Docker daemona

parent 7c17f170
No related branches found
No related tags found
No related merge requests found
...@@ -190,7 +190,7 @@ else ...@@ -190,7 +190,7 @@ else
# let's adapt the Docker MTU based on host's MTU # let's adapt the Docker MTU based on host's MTU
# we have to find out which interface is the default one # we have to find out which interface is the default one
if ! hash ip 2>/dev/null ; then if ! hash ip 2>/dev/null ; then
echo "ERROR: It seems, that 'ip' command is NOT available!" echo "ERROR: It seems, that 'ip' command is NOT available! Unable to set the Docker daemon MTU."
echo "Exiting..."; echo "Exiting...";
exit 1; exit 1;
else else
...@@ -203,6 +203,9 @@ cat >/etc/docker/daemon.json <<EOF ...@@ -203,6 +203,9 @@ cat >/etc/docker/daemon.json <<EOF
"mtu": $default_iface_mtu "mtu": $default_iface_mtu
} }
EOF EOF
# finally, we have to restart the daemon (TODO: distribution specific?)
systemctl restart docker
fi fi
# finalize with some information # finalize with some information
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment