{"action":"created","issue":{"url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/issues/2","labels_url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/issues/2/comments","events_url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/issues/2/events","html_url":"https://github.com/andrewholgate/docker-drupal-project-example/pull/2","id":111336393,"number":2,"title":"Add a cleanup command before updating `etc/hosts`","user":{"login":"marco-loche","id":1536800,"avatar_url":"https://avatars.githubusercontent.com/u/1536800?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-loche","html_url":"https://github.com/marco-loche","followers_url":"https://api.github.com/users/marco-loche/followers","following_url":"https://api.github.com/users/marco-loche/following{/other_user}","gists_url":"https://api.github.com/users/marco-loche/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-loche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-loche/subscriptions","organizations_url":"https://api.github.com/users/marco-loche/orgs","repos_url":"https://api.github.com/users/marco-loche/repos","events_url":"https://api.github.com/users/marco-loche/events{/privacy}","received_events_url":"https://api.github.com/users/marco-loche/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-14T06:54:39Z","updated_at":"2015-10-14T07:47:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/pulls/2","html_url":"https://github.com/andrewholgate/docker-drupal-project-example/pull/2","diff_url":"https://github.com/andrewholgate/docker-drupal-project-example/pull/2.diff","patch_url":"https://github.com/andrewholgate/docker-drupal-project-example/pull/2.patch"},"body":"Add a command to remove previous entry of the same host in the `/etc/hosts` file"},"comment":{"url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/issues/comments/147965102","html_url":"https://github.com/andrewholgate/docker-drupal-project-example/pull/2#issuecomment-147965102","issue_url":"https://api.github.com/repos/andrewholgate/docker-drupal-project-example/issues/2","id":147965102,"user":{"login":"andrewholgate","id":3862180,"avatar_url":"https://avatars.githubusercontent.com/u/3862180?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewholgate","html_url":"https://github.com/andrewholgate","followers_url":"https://api.github.com/users/andrewholgate/followers","following_url":"https://api.github.com/users/andrewholgate/following{/other_user}","gists_url":"https://api.github.com/users/andrewholgate/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewholgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewholgate/subscriptions","organizations_url":"https://api.github.com/users/andrewholgate/orgs","repos_url":"https://api.github.com/users/andrewholgate/repos","events_url":"https://api.github.com/users/andrewholgate/events{/privacy}","received_events_url":"https://api.github.com/users/andrewholgate/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T07:47:43Z","updated_at":"2015-10-14T07:47:43Z","body":"Excellent idea.\r\n\r\nAs you've done in other projects, let's add this as a script for the user to execute:\r\n\r\n```\r\n#!/bin/bash\r\n\r\necho -e \"\\033[1mRemove old entries from /etc/hosts\\033[0m\"\r\nsudo sed -i_bak -e '/example\\.drupalproject\\.com/d' /etc/hosts\r\n\r\necho -e \"\\033[1mAdd new entry from /etc/hosts\\033[0m\"\r\nsudo bash -c \"echo $(sudo docker inspect -f '{{ .NetworkSettings.IPAddress }}' \\\r\ndockerdrupalprojectexample_drupalexampleweb_1) \\\r\nexample.drupalproject.com \\\r\n>> /etc/hosts\"\r\n```\r\n\r\nUnder the section [Add IP to host](https://github.com/andrewholgate/docker-drupal-project-example/blob/master/README.md#add-ip-to-host) we should also also update the README to something like:\r\n\r\n```\r\n# Add / Update IP address in hosts file.\r\n./hosts.sh\r\n```"}}