-
Notifications
You must be signed in to change notification settings - Fork 454
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
Enable exposed port to be configurable to run container in host networking mode on a port different than 80 #138
Comments
I looked a bit into this and found this mentioned in the official ngix docker repo
As of now I don't think envsubst is included by default with alpine. We need to include this when building the image: Afterwards we can perform the environment substitution in the run.sh script. |
This feature would be extremely helpful. Port 80 is the default on many images. In the context of a Kubernetes pod, each container must have a unique port – so I cannot run Nginx and PHPMyAdmin within the same pod. |
Solution: you can change the port with a Dockerfile.
|
@KristianWindsor: Thanks for the info, It's not really a persistent solution because you have to do that after every container update. |
But we do not have a nginx version anymore, right? |
So it's easier to add this functionality using environment variables? |
https://github.com/phpmyadmin/docker/blob/master/apache/Dockerfile I have to look if it is possible with the image php gives us |
A way to avoid building your own image (to keep things simpler) is to start the image like this:
|
Thank you for the command |
Ref docker-library/php#94 (comment) @J0WI would such a solution be accepted in the entrypoint using an ENV variable ? |
Is there a use case to run them in the same pod? For Docker you can also use |
in Google Cloud Run, there is an already defined env variable |
Any updates about this feature? |
Hi @J0WI |
IMHO this shouldn't be changed in every image based on the PHP base image nextcloud/docker#1504 (comment) |
Duplicate of #340 |
Done in #369 |
If I'm running the container with --net=host, it can only be reached on port 80 (ports mapping is disabled when network mode is host).
It would be great to have the possibility to set the port where nginx will listen to with an environment variable (an example is this image: https://github.com/mesoscloud/chronos).
The text was updated successfully, but these errors were encountered: