Pickl3s Posted November 5, 2022 Share Posted November 5, 2022 Is it possible to set the conatiner port dynamically?  I have a container running on ports 8095 and 40123 by default. I can change this via 2 variables (but this also affects the server, so the container ports would have to be changed as well)  What I mean as command  Default: docker run -p 8095:8095 -p 40123:40123 ...  With modified ports: docker run --env WEB_PORT=1234 --env=API_PORT=4321 -p 1234:1234 -p 4321:4321 ...  How can I set this dynamically in the config?   Quote Link to comment
trurl Posted November 5, 2022 Share Posted November 5, 2022 Don't understand what you are trying to do that is different than docker port mapping Quote Link to comment
Pickl3s Posted November 5, 2022 Author Share Posted November 5, 2022 How can I configure "Container Port" with the corresponding variable and its Default Value  For example: Variable WEB_PORT = 8095 (Default, can be changed)  Container Port = $WEB_PORT (Changes automatically when variable is changed) Quote Link to comment
Solution Squid Posted November 5, 2022 Solution Share Posted November 5, 2022 You can't. Quote Link to comment
Pickl3s Posted November 5, 2022 Author Share Posted November 5, 2022 Ah ok thanks Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.