Skip to content

Instantly share code, notes, and snippets.

@Hexa
Last active July 19, 2020 14:00
Show Gist options
  • Save Hexa/c2e31d5c2b14f96d9d8988c1aecb43fd to your computer and use it in GitHub Desktop.
Save Hexa/c2e31d5c2b14f96d9d8988c1aecb43fd to your computer and use it in GitHub Desktop.
docker で mDNS

Ubuntu 20.04 のコンテナの場合

avahi のインストール

# apt -y install avahi-daemon

/etc/avahi/avahi-daemon.conf の変更

[server]
・
・
・
enable-dbus=no

起動

# /etc/init.d/avahi-daemon start

または

# avahi-daemon --daemonize

任意のホスト名を付ける場合

docker container run で --hostname を指定する

$ docker container run --rm -it --hostname c1 ubuntu:20.04 bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment