@timhaak (Tim Haak) posted a new topic, subject "Keep IP of docker.local host between restarts". It read:

   ### Expected behavior
    
    That between restarts the ip of docker.local host ip stays the same.
    
    ### Actual behavior
    
    Keep's chaning ie 732-454-5507 then 732-454-5507 etc
    
    ###Reasoning  
    This isn't a bug but I can see it confusing people especially people who are learning.
    
    The main reason being that unless a user knows how to set something up that does a cname they will have to manually edit /etc/hosts or something similar to point a dns tiffanysmith@example.com. I.e dev.example.com.
    
    Then change it each time it changes.

After which, @seeruk (Elliot Wright) added

    One other thing about this. Coming from Docker Machine, I used dnsmasq to set up a wildcard domain name @ `*.docker.local`. This meant I could just stick a project name in front, and use that to make navigating to projects in a browser much easier (i.e. the history would be kept separate). The problem is, I don't want to have to change the dnsmasq configuration file every time the VM gets restarted.
    
    It'd be great to be able to choose an IP address that it would run on. I did try it with hostnet and a specific host and docker IP there, but I'm a little confused by the option to specify IP addresses as hostnet seems to be designed to use your host address anyway.
    
    In any case, being able to choose a static IP address would be awesome.

Then @freshsauce (Dave Barnwell) said

    Likewise I use dnsmasq and the IP address changing on each restart is a real pain now, as I have to edit my dnsmasq config each day. So an option to set the IP address would be great.

After which, @chulkilee (Chulki Lee) added

    > localhost is now used for port forwarding by default.docker.local will no longer work as of Beta 9.
    
    So you can just use `732-454-5507`.

@timhaak (Tim Haak) replied

    Yup 
    
    Busy using it and much better.


{'source': 'discourse', 'url': 'https://forums.docker.com/t/keep-ip-of-docker-local-host-between-restarts/8613', 'title': 'Keep IP of docker.local host between restarts', 'views': 1608, 'has_accepted_answer': False, 'word_count': 316, 'like_count': 5, 'reply_count': 1, 'participant_count': 4, 'posts': 5, 'tags': '', 'author': '@timhaak (Tim Haak)', 'participants': '@timhaak (Tim Haak), @seeruk (Elliot Wright), @freshsauce (Dave Barnwell), @chulkilee (Chulki Lee)', 'image_url': [None], 'created_at': '2016-04-07T09:20:15.011Z', 'last_posted_at': '2016-05-02T19:18:48.510Z'}