LXC: Modifications in /etc/hosts are not persistent

cmonty14

Renowned Member
Mar 4, 2014
344
6
83
Hello!

I want to maintain every hostfile in LXC following this template:
Code:
127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

However, this modification is not persistent but is overwritten after each restart of the container.

What do you recommend to make this modification persistent?

THX