-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXPOSE does not support port ranges #12293
Comments
@colinbendell does the image work with Docker. or is the image bad? |
This is a valid image in Docker. It is poorly documented though in Docker. |
The oci spec https://github.com/opencontainers/image-spec/blob/main/config.md only documents the |
I thought the existing code already handled ranges for expose, but I could well be wrong. Concur we should fix it. |
The --expose run parameter does support ranges. The attached PR just re uses the logic. |
Fixes issue containers#12293. EXPOSE directive in images should mirror the --expose parameter. Specifically `EXPOSE 20000-20100/tcp` should work the same as `--expose 20000-20100/tcp` Signed-off-by: Colin Bendell <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
EXPOSE
with a port range (eg: EXPOSE 20000-20100) in aDockerfile
throws a parsing error when attempting to run the image.Likely related to: https://github.com/containers/podman/blob/main/pkg/specgen/generate/ports.go#L416-L423
Steps to reproduce the issue:
podman build --tag portrangetest .
podman run --rm -it -P portrangetest
Describe the results you received:
Describe the results you expected:
Expect no error
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: