Hi, I think one of the best resources showing how networking and containers works, is the tests for containers and networking ;-) From them I also based my setup which you can see a slightly old version of at https://github.com/kampfschlaefer/nixconfig.
Also you already found the 13-char limit on container names, which is a result of the 16-char limit of network interface names in linux and the devices are vb-<name> or ve-<name> for the containers… I was planning to add an assertion there but got sidetracked by life and a 3D printer. Have fun, Arnold On Mon, 13 Mar 2017 02:12:12 +0000 Tomasz Czyż <tomasz.c...@gmail.com> wrote: > Hey, > > could anyone using nixos-container (declarative style) share how you > setup networking? > > I'm trying to setup few containers with private network and http > proxy at the front. Each container potentially could run application > on port 80 and I would like to expose them through proxy. > > I tried to set this up with > > privateNetwork=true; > hostAddress > localAddress > > and I tried to also run nat on the host with (just to enable outbound > traffic) > internalInterfaces = ["ve-+"]; > externalInterfaces = "eth0"; > > but no luck. > My next try will be creating bridge on the host and add containers to > that bridge. Is that how you do stuff or are better ways of doing > container networking? > > Tom
signature.asc
Description: PGP signature
_______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev