user2330314
user2330314

Reputation: 41

How to change mtu size inside docker container?

I would like to change the MTU size from specific container, not at docker host, but any command are working, I've tried: ifconfig eth0 mtu 1400 and ip link set mtu 1400 dev eth0, but I've got "operation not permited", I'm already root user.

Upvotes: 4

Views: 6380

Answers (1)

z0nderling
z0nderling

Reputation: 51

Have you tried running your container with the --cap-add=NET_ADMIN option? e.g:

docker run -it --rm --cap-add=NET_ADMIN ubuntu:14.04 ip link add dummy0 type dummy

further reading: https://docs.docker.com/engine/reference/run/

Upvotes: 2

Related Questions