moby / moby/libnetwork

Add support for not mounting network-related files

Open
#1,928 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
875
PR merge metrics
No merged PRs in 30d

Description

Right now there is no way to stop docker (that I know of, anyhow) from mounting /etc/resolv.conf, /etc/hostname, and /etc/hosts in your containers. These are networking-related files and docker presuming that it knows how to set them in a --net=none environment is flawed. In particular this screws up any kind of orchestration inside the container that needs to move these files, because they are not files and cannot be moved. (This is a common problem for anyone who tries to use dhclient, but any atomic operation that requires making temp files and moving them into place gets broken).

Preferably this would happen if you set --net=none, but I understand that may be a problem for backwards compatibility, so I would be fine with some other switch to flip.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the issue. Start by locating where /etc/resolv.conf, /etc/hostname, and /etc/hosts are mounted for containers, then determine how a switch or --net=none behavior could disable those mounts without breaking compatibility. Done means users can prevent these mounts and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.