OxalisCommunity / oxalis

Oxalis - PEPPOL Access Point open source implementation - Core component
Other
131 stars 92 forks source link

Docker image exposed port #426

Closed thebilge closed 4 years ago

thebilge commented 5 years ago

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.

klakegg commented 5 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?

thebilge commented 5 years ago

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.

klakegg commented 5 years ago

How may I change the port declared in the immutable Docker image based on configuration of the application inside?

thebilge commented 5 years ago

You can't. That's why I proposed the solution over env variable in the comment above.

klakegg commented 4 years ago

Software running inside a Docker container is not able to change configuration of the immutable Docker image it is part of during runtime.