Docker Community Forums

Share and learn in the Docker community.

Setting Container MTU in Swarm Mode


(Campervelourium) #1

I’m trying to set the MTU of all interfaces on my containers, running Docker in swarm mode. I’ve tried to set $DOCKER_OPTS in /etc/default/docker to include --mtu=1350, but this doesn’t do anything. We’re using docker stack deploy -c docker-compose.yml to start the service, and it’s replicated across the swarm a few times.

Is there a way in swarm mode to set the MTU of eth0 and eth1 for every container on startup?

Ubuntu 14.04.5 LTS

Docker version 17.09.0-ce, build afdb6d4


(Campervelourium) #2

I fixed it by removing the ingress network and then removing the docker_gwbridge on every node, before recreating docker_gwbridge with --opt com.docker.network.driver.mtu=1350