Open QYG2297248353 opened 1 week ago
Hi,
the first EXPOSE
comes from the docker.io/httpd
base image, the second from this Image.
From what I know about Containerfiles, there's nothing we can do to remove/override existing EXPOSE
instructions.
But since this instruction does nothing without a user explicitly mapping a port and nothing inside the Container listening on that port, it can simply be ignored.
Thank you, in this project It is true that 80 is not found in Dockerfile. Port 80 may mislead users, especially when using NAS users will automatically read 80 as the configuration parameter
It appears that if you need to resolve this problem, you need to re-select the base image
Thank you, actually it doesn't affect users' usage now
Is there an another PHP-Apache Image that does not expose this port?
Including a custom/non-official DockerHub is too risky in my opinion and might not be a simple "drop-in" replacement, meaning it would maybe break things for users.
I don't think building a custom PHP-Apache Image is feasible for this project, as it would introduce a lot of code I have to maintain.
Like I said, nothing listens to the port. Any Container runtime/orchestration solution that automatically exposes ports (which they shouldn't in my opinion) would still receive no traffic.
There is indeed no official php image that does not expose the port So there is no useful solution for this item It is not recommended to use host mode for network mode Even accessing 80 does not return any results, and there will be no other security problems.
The admin panel can recognize that Port 80 cannot start the service if you use the host network, occupying Port 80