Closed jacob-swanson closed 1 year ago
Unable to reproduce on my system with default network.
Tried with:
$ sudo podman run --rm -ti --name web1 python:3.10 python -m http.server 8080
$ sudo podman run --rm -ti --name webclient python:3.10 curl -v http://web1:8080
- system: `"x86_64-linux"`
- host os: `Linux 5.19.16, NixOS, 22.11 (Raccoon), 22.11.20221024.1e684b3`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.11.0`
- channels(root): `""`
- channels(mark): `""`
- nixpkgs: `/nix/store/083m43hjhry94cvfmqdv7kjpvsl3zzvi-source`
I will try with newer nixpkgs and/or virtualisation.oci-containers
soon.
Thanks for trying to reproduce the problem.
I found a workaround for getting dnsname working on the default network.
I noticed that, for the foobar
network I created, /root/.config/cni/net.d/foobar.conflist
gets created. Then I copied /etc/cni/net.d/87-podman-bridge.conflist
into that folder, then dns started working on the default network.
cp /etc/cni/net.d/87-podman-bridge.conflist /root/.config/cni/net.d/
podman system reset
reboot
Describe the bug
The podman dnsname plugin is not working for the default network, as the
defaultNetwork.dnsname.enable
option implies. I am able to work around this by creating a custom network manually, but this is undesirable since there doesn't seem to be an easy way to declaritively create a podman network.Steps To Reproduce
nixos-rebuild switch
--network foobar
argument is removed in the example below).sudo podman run -it --name client quay.io/libpod/alpine_nginx:latest curl http://web.dns.podman/ podman rulez
virtualisation = { podman = { enable = true; defaultNetwork.dnsname.enable = true; dockerCompat = true; dockerSocket.enable = true; extraPackages = [ pkgs.zfs ]; }; }; users.groups.podman.gid=995; virtualisation.oci-containers.containers = { influxdb2 = { image = "influxdb:2.5"; volumes = [ "/mnt/user/appdata/influxdb2:/var/lib/influxdb2" ]; ports = ["8086:8086"]; extraOptions = [ "--network=foobar" ]; };
};