VisionSystemsInc / VisionSystemsInc/vsi_common
Host /etc/hosts in docker
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8
- Forks
- 9
- Avg merge
- 36m
- Merged PRs (30d)
- 1
Description
Currently docker makes an /etc/hosts file dynamically. So if there are any /etc/hosts settings on the host needed by a container, it will fail
Bad ideas
- mount hosts:/etc/hosts on top of container:/etc/hosts. This will loose entries that belong there for a container, and will break in more complicated scenarios.
mount hosts:/etc/hosts into container:/etc/hosts2, and have an entrypoint concatenate the two. This will not work. /etc/hosts is read only, (and dynamic I think).- network mode = hosts. That's not segregated at ALL!
Ideas:
- mount hosts:/etc/hosts into container:/etc/hosts2, and have an entrypoint concatenate the two.
- Add the ability to
Just-docker-composeto parse /etc/hosts, ignore localhost entries, and turn additional entries into extra_hosts entries.
Related:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Just-docker-compose entry point and its handling of Docker host configuration, then review how /etc/hosts and extra_hosts are currently represented. Compare the proposed approaches against Docker's dynamically generated /etc/hosts behavior and container isolation. Done means one agreed approach is implemented and its host-entry behavior is covered by reproducible tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100