docker / docker/cli

Find container by host port mapping

Open
#2,004 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/ux kind/feature
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

It would be extremely useful to find a running docker container by host:container port mapping, not just the published container port.

Current Behavior:

[user@host ~] docker ps --format '{{ .ID }} {{ .Ports}}' --filter=publish=9999:8443
Error response from daemon: filter for 'publish' should not contain ':': 9999:8443

Desired Behavior:

[user@host ~] docker ps --format '{{ .ID }} {{ .Ports}}' --filter=publish=9999:8443
abcdefghijkl 0.0.0.0:9999->8443/tcp

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 the publish filter used by docker ps, focusing on parsing host:container port mappings. Reproduce the command shown in the issue and verify that filtering by 9999:8443 returns the container with 0.0.0.0:9999->8443/tcp.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.