I'm learning docker 1.8. I wanted to change the hostname of the container after I create them. I tried to edit /etc/host
inside the container and got overwritten every time I attach
then start
the image. I tried to edit the following file, and the hostname gets overwritten.
[root@localhost ~]# docker inspect high_blackwell | grep hostname
"HostnamePath": "/var/lib/docker/containers/15b84f7012383b1af2d4c8c6443506cdff3b19cb1d87d3dfdcb10df126c4eec3/hostname",
[root@localhost ~]#
None of these answers worked for me