Score:0

can't set a windows docker container hostname in the hosts file

cn flag

I set a windows docker container to run some software (abbyy fineprint) that needs to match the docker name (abbydock) with the localhost ip (127.0.0.1). I'm starting the container with docker run -h abbydock.... What I've done is to add an entry in c:\windows\system32\drivers\etc\hosts with the following content:

127.0.0.1 abbydock

It worked once, I ping to abbydock and the answer is 127.0.0.1 . The next times the container just ignores any information that I put on the hosts file if that name matches the container hostname, for example a ping will answer the container ip and no the loopback wrong ping answer Anyway, if I set any other hostname to localhost and then ping that any other name the answer will be 127.0.0.1

where or how can i set the wanted information?

c:\Windows\System32\drivers\etc>ipconfig /displaydns

Windows IP Configuration

    1.0.0.127.in-addr.arpa
    ----------------------------------------
    Record Name . . . . . : 1.0.0.127.in-addr.arpa.
    Record Type . . . . . : 12
    Time To Live  . . . . : 580106
    Data Length . . . . . : 8
    Section . . . . . . . : Answer
    PTR Record  . . . . . : abbydock


    abbydock
    ----------------------------------------
    Record Name . . . . . : abbydock
    Record Type . . . . . : 28
    Time To Live  . . . . : 1200
    Data Length . . . . . : 16
    Section . . . . . . . : Question
    AAAA Record . . . . . : fe80::e81b:c4e4:83d:a9b5


    abbydock
    ----------------------------------------
    Record Name . . . . . : abbydock
    Record Type . . . . . : 1
    Time To Live  . . . . : 1200
    Data Length . . . . . : 4
    Section . . . . . . . : Question
    A (Host) Record . . . : 172.22.54.104

A record should be 127.0.0.1, or at least I should get an extra A record

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.