cli icon indicating copy to clipboard operation
cli copied to clipboard

Document CLI support for per interface sysctls

Open robmry opened this issue 1 year ago • 1 comments

- What I did

https://github.com/moby/moby/pull/47686 adds driver-opt label com.docker.network.endpoint.sysctls, to support per-interface sysctls.

The extended --network syntax is needed, but wasn't documented.

The quoting needed to set more than one sysctl using docker [create|run] --network driver-opt or docker network connect --driver-opt isn't obvious - so, added tests and examples to the docs.

- How I did it

  • Fix TestNetworkConnectWithFlags - because it didn't do anything, and is needed to test the new option.
  • Document the v25.0 changes to allow more than one network connection in create/run, with the extended --network syntax.
  • Added tests and examples to docs for per-interface sysctl setting.

- How to verify it

New tests added.

- Description for the changelog

Document the use of `driver-opt` in the CLI for setting per-interface sysctls.

robmry avatar Apr 08 '24 08:04 robmry

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.33%. Comparing base (6c70360) to head (d5d94e4). Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4994      +/-   ##
==========================================
+ Coverage   61.09%   61.33%   +0.24%     
==========================================
  Files         298      295       -3     
  Lines       20675    20701      +26     
==========================================
+ Hits        12631    12697      +66     
+ Misses       7147     7101      -46     
- Partials      897      903       +6     

codecov-commenter avatar Apr 08 '24 09:04 codecov-commenter

@thaJeztah does this LGTY?

laurazard avatar May 14 '24 12:05 laurazard

Updated to reflect a last-minute change of heart on the sysctl naming (net.ipv6.conf.eth0.disable_ipv6 was shortened to ipv6.conf.disable_ipv6, now it's net.ipv6.conf.IFNAME.disable_ipv6).

robmry avatar May 26 '24 12:05 robmry