I prepared my Alpinelinux docker image with a proper /etc/resolv.conf file but when I start it I found its content get changed, to:
$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 2607:fe...
I searched and listed all my Alpinelinux packages and I'm sure nothing close to systemd or resolved is installed.
So is /etc/resolv.conf file created by docker host?
Anyway, this is the actual reason I'm asking the question --
% cp /etc/resolv.conf.good /etc/resolv.conf
cp: can't create '/etc/resolv.conf': File exists
% ls /etc/resolv.conf -l
-rw-r--r-- 1 root root 615 May 5 12:45 /etc/resolv.conf
I.e., why is /etc/resolv.conf file so special that even cp would fail?
Never see that before. Hints?