Skip to content

Conversation

@kaysond
Copy link

@kaysond kaysond commented Dec 31, 2025

FYI this doesn't actually forward the ports when running. That still has to be done manually in docker compose or docker run. It's just an indication that these are the ports used. Other services, like traefik, can use this information to automatically reverse proxy requests to the correct port.

@skrashevich
Copy link
Contributor

I have doubts about the need for this change.

But if you consider it necessary, why did you ignore hardware.Dockerfile and port 8555?

@kaysond
Copy link
Author

kaysond commented Jan 1, 2026

I have doubts about the need for this change.

It's a documented best practice: https://docs.docker.com/build/building/best-practices/#expose
And as mentioned, other services/containers like traefik can and do use it to know what ports the container listens on

But if you consider it necessary, why did you ignore hardware.Dockerfile and port 8555?

Added. Just an oversight / misunderstanding on my part.

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 1, 2026

Looks like official nginx image also uses EXPOSE. Although this port may be incorrect under custom application configurations.

https://github.com/nginx/docker-nginx/blob/master/stable/alpine-slim/Dockerfile

@AlexxIT AlexxIT self-assigned this Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants