A container image build directive that documents the network ports intended to be exposed by a container.
EXPOSE records the network ports intended for containers created from an image. It documents image metadata rather than defining the container's default command or environment. section 2.3.1
When you run podman run --publish-all ..., Podman reads the image's EXPOSE ports and connects them to ports on the host. section 2.3.1
Declare port 8080
EXPOSE 8080
How Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more covers it
How deep it goes
Defines port metadata and its --publish-all behavior, without detailing manual publishing or application-level networking.
Examples
Uses EXPOSE 8080 and podman run --publish-all as concrete operational examples.
What it assumes
Assumes basic Containerfile and Podman run knowledge while defining EXPOSE's image-level role.
What you can do after
Operate containers with podman run --publish-all using ports recorded by EXPOSE.
How it connects
Connects Containerfiles, container images, Podman run, and OCI runtime specifications.
.NET in Action, Second EditionThe EXPOSE instruction documents a container port on which an application listens without publishing that port to the host.
Dockerfilepart of · A Dockerfile is a text file containing declarative instructions for building a container image and specifying its contents and runtime metadata.
This explainer was generated by Manning's knowledge graph from the text of Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more. The section links point to the parts of the book it draws on.