Skip to content

docs/reference/run.md: says --expose overrides EXPOSE when it doesn't #14050

@SpencerBrown

Description

@SpencerBrown

docs/reference/run.md in section "Overriding Dockerfile image defaults" implies that the docker run --expose option overrides the EXPOSE command in a Dockerfile. It does not. docker run --expose simply adds to the list of exposed ports. It does not override the Dockerfile EXPOSE list of ports.

If you think this is trivial, this actually cost me a cycle, because I assumed from the doc that I could put an EXPOSE command in the Dockerfile, and override it later.

There should be a --unexpose option but that's a different issue. This issue is just about correcting the doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions