docker / docker/cli

Ability to configure default networking type

Open
#4,334 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/0-triage
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description

The cli currently defaults to bridge networking when --network is not supplied when calling docker run.

My use-case is to use host networking with GitHub docker actions. As the docker command is called by GitHub Actions itself, I am unable to add the --network flag to the command.

It would be nice if we can configure the default network type either via an environment variable or in config.json to set the network type to use in the event the --network flag is not supplied.

Contributor guide

Open the contributing guide

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

Start by tracing how the Docker CLI handles docker run when --network is omitted, then review the proposed environment-variable and config.json configuration paths. Define the supported way to select a default network type and verify that an explicit --network value still takes precedence; done means host networking can be selected for GitHub Actions without changing the command.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
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.