how to change MTU inside docker container on ubuntu 14.4

I want to change MTU(Maximum Transmission Unit) inside docker which is running on ubuntu 14.04. Also docker container running with ubuntu 14.04.

The problem is that its docker0 interface on host os can change the MTU value from 1500 to 9000 but its doesn’t gives affects inside docker os. means inside docker it is running with a older value i.e 1500. And when I restart the docker services on host machine its all changes goes to default.

  • Running R Models using rpy2 interface on Docker. I am facing issue related to opening the port
  • Selenium ChromeDriver Failed to load resource: net::ERR_CONNECTION_CLOSED
  • How to save a Docker image
  • Call rabbitmq from nodejs
  • How to verify my docker-compose.yml?
  • Docker volume created with nfs server is not reflecting the data from nfs server
  • I had also tried with creating bridge connection with new interface but while I up that interface its down my whole network and doesn’t work anymore.

    Help will be highly appreciated

  • Connect to Mysql on localhost from docker container
  • Docker failing to see updated fixtures CSV in rspec test directory
  • Error response from daemon: (config) includes invalid characters for a local volume name
  • How do I handle passwords and dockerfiles?
  • Connection reset by peer @ io_fillbuf - fd:8 (HTTPClient::KeepAliveDisconnected)
  • CF Garden-runC as a container orchestration engine?
  • One Solution collect form web for “how to change MTU inside docker container on ubuntu 14.4”

    See docs.docker.com/articles/networking/#docker0 extract “

    --mtu=BYTES — override the maximum packet length on docker0.
    

    On Ubuntu you would add these to the DOCKER_OPTS setting in /etc/default/docker on your Docker host and restarting the Docker service.”

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.