Closed thebilge closed 4 years ago
Do you have any recommendations on how to fix this issue? And what is the usecase for changing jetty port when using Docker?
One solution might be utilizing an env variable like JETTY_PORT and using it in Dockerfile with a default value and expose. In application level you can check env variables first, then conf, then default..
This is not a big issue and we have already applied another workaround. Our case might be unusual, i am not sure (convention based service discovery configuration). When i run the oxalis docker image with my oxalis.conf file which has oxalis.jetty.port
set and i could not access the application using that port, it did not feel right.
How may I change the port declared in the immutable Docker image based on configuration of the application inside?
You can't. That's why I proposed the solution over env variable in the comment above.
Software running inside a Docker container is not able to change configuration of the immutable Docker image it is part of during runtime.
Hi, just to note that if you set
oxalis.jetty.port
to something other than 8080, the oxalis server is running at that port but the docker container is still exposing 8080 not the correct port. FYI.