I have a docker file and running on ubuntu,
How can i add a website url which can be started at port 3000 in docker file and is there any way to parameterize the url
In short i want to add url of my website to run on port 3000 when the cluster is spun and run on localhost
any help will be great
Please, explain in more details what you would like to achieve. It doesn’t make sense to “add url of my website to run on port 3000”. A URL will not start a website. I don’t know how a cluster is related to this question.
Do you want to run a proxy server and use
localhost:3000 in your browser instead of
That wouldn’t even require Docker.
I am not sure what you mean by that, but you can pass “parameters” to applications in a Docker container by using environment variables.
There is a URL already set which is coming from some source code, I couldn’t get clue where that has been set, I want to replace that URL on local host to the one i want to open and that is related to dev environment. I want to set in dockerfiler or may be parameterize it so that other environment would get different URL
i have s server ip address which opens a webpage which allows developer to take advantage for their purpose. In short when i run docker it run a website at localhost which i am not sure from where it is coming so i want to replace with my dns name of the url and the url can be parameterrize then would be great
It is still not clear. Note that I know nothing about your system and goals and explanations as
don’t make it more clear. It could mean many things. The best questions is similar to a documentation that shares all the information to make someone understand the system.
The only way I can imagine something like this is using a proxy as I wrote in my previous post. Please, don’t forget to reply all the questions or we won’t be able to understand yours.
My answer is still the same. You need environment variables. Maybe build arguments. You should read about entrypoints too.
This is my repository where I use all of these:
sed to change configuration files.
Sometimes you don’t even need that since you can just change an environment variable which is already used in a command. If it isn’t, you can change the command too to use the variable.
Thanks for the quick reply, In short what i wanted is when the docker continer up and running and if i goto localhost then it should run google.com(just for example) rather what is running now.
When i said want to partameterize , i mean instead of google i can change it to yahoo.com but all these i want to achive from dockerfile