Skip to content

[Docker Compatibility] Missing --expose and --publish-all (-P) flags in finch run #1659

@tinovyatkin

Description

@tinovyatkin

Summary

Finch is missing support for the --expose and --publish-all (-P) flags that are available in Docker CLI. These flags are commonly used in development tooling and their absence impacts Docker compatibility.

Upstream Issue

This is an nerdctl limitation tracked at: containerd/nerdctl#4689

Docker Behavior

# Expose port 80 and publish to random host port
docker run --expose 80 -P nginx:alpine

# Check assigned port
docker port <container_id>
# Output: 80/tcp -> 0.0.0.0:49153

Podman Compatibility

Podman fully supports both --expose and -P/--publish-all flags.

Impact

This gap affects tools that rely on dynamic port allocation:

  • VS Code Docker extension
  • Development workflows requiring multiple service instances
  • Container orchestration patterns

Workaround

A workaround for VS Code Docker extension is implemented in PR #327 that logs warnings when these flags are used.

Suggested Action

Consider contributing the implementation upstream to nerdctl to maintain Docker CLI compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions