You haven't done anything wrong.
Every time you run sudo
there is a lookup to the sudoers configuration files. One thing you can do with sudoers is set per machine/host rules. Part of that process means that every sudo
call looks up the hostname to see if you've been granted priv's on that host. DNS doesn't know who ubuntu
is so it logs a warning. Doesn't affect anything, just clutters up logs.
Easy solution would be to tell the host who ubuntu
is. Either a custom DNS entry or a change to /etc/hosts
, but changing /etc/hosts
will disappear when you start a new container.