12

i can't seem to find a good explanation for the reason behind using --net vs --network with docker.
--help doesn't show --net but only shows --network, can somebody please explain the difference ?

Thank you !

Mohamed Benkedadra
  • 1,964
  • 3
  • 21
  • 48

1 Answers1

11

--network and --net options in the Docker are the same and work similarly. But --net is shorter in use.

https://docs.docker.com/engine/reference/commandline/run/#options

For more information:

https://github.com/moby/moby/issues/24145 and https://github.com/moby/moby/pull/23324