{"id":20132941,"url":"https://github.com/gregolsky/whales-names","last_synced_at":"2025-04-09T16:44:11.385Z","repository":{"id":25911693,"uuid":"106876223","full_name":"gregolsky/whales-names","owner":"gregolsky","description":"Simplistic solution of \"Why can't I reach my docker containers by name?\" problem. Continuously update hosts file (/etc/hosts) with docker container names and aliases and watch for changes.","archived":false,"fork":false,"pushed_at":"2023-03-02T21:27:34.000Z","size":625,"stargazers_count":9,"open_issues_count":4,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T02:53:00.661Z","etag":null,"topics":["containers","dns","docker","hostname","hostnames","hosts"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregolsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-13T21:46:30.000Z","updated_at":"2022-05-27T21:03:17.000Z","dependencies_parsed_at":"2023-01-14T03:40:12.150Z","dependency_job_id":null,"html_url":"https://github.com/gregolsky/whales-names","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregolsky%2Fwhales-names","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregolsky%2Fwhales-names/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregolsky%2Fwhales-names/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregolsky%2Fwhales-names/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregolsky","download_url":"https://codeload.github.com/gregolsky/whales-names/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248069698,"owners_count":21042687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","dns","docker","hostname","hostnames","hosts"],"created_at":"2024-11-13T20:56:06.344Z","updated_at":"2025-04-09T16:44:11.365Z","avatar_url":"https://github.com/gregolsky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whales' names 🐋\r\n\r\nSimplistic solution of *why can't I reach my docker containers by name?* problem. Continuously update hosts file (`/etc/hosts`) with docker container names and aliases and watch for changes.\r\n\r\n[![npm version](https://badge.fury.io/js/whales-names.svg)](https://badge.fury.io/js/whales-names) [![Known Vulnerabilities](https://snyk.io/test/github/gregolsky/whales-names/badge.svg)](https://snyk.io/test/github/gregolsky/whales-names) [![Build Status](https://travis-ci.org/gregolsky/whales-names.svg?branch=master)](https://travis-ci.org/gregolsky/whales-names)\r\n\r\n## Installation 🔨\r\n\r\n```\r\n$ npm install -g whales-names\r\n```\r\n\r\n## Usage 📘\r\n\r\n```\r\n$ whales-names\r\nSynchronizing docker container hostnames in hosts file.\r\n```\r\n\r\nAfterwards you are going to see a new section in the end of your `/etc/hosts` file:\r\n\r\n```\r\n...\r\n\r\n# whales-names begin\r\n172.21.88.220\tdfbf5d96df3e node1 \r\n172.21.94.104\t79468a158d1e node2\r\n172.21.89.244\t0c9b251458f4 db\r\n# whales-names end\r\n\r\n```\r\n\r\nYou can end it with simple Ctrl+C. Errors, if any are going to be printed on the console.\r\n\r\n### Elevated privileges ⚠️\r\nDue to file permissions of `/etc/hosts` file you need to use elevated privileges (run as Administrator, if you will) for running it.\r\n\r\n\u003e **Rae**: You like whales?\r\n\u003e\r\n\u003e **Jesse**: I like him.\r\n\u003e\r\n\u003e **Rae**: Well, he doesn't like anybody, so stay away from him. You see, Willy's a case. A very special case.\r\n\u003e\r\n\u003e **Jesse**: So? Who isn't?\r\n\u003e\r\n\u003e Free Willy (1993) 🐳","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregolsky%2Fwhales-names","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregolsky%2Fwhales-names","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregolsky%2Fwhales-names/lists"}