ı have a container but ı want to, changing to localhost port how can ı do
i have a port that works in localhost, but when I change the port, I want it to continue working in localhost
If your post gets no response, it’s usualy because the objective is not clear enough for someone to understand what you try to archive.
Please rephrase your objective and provide the exact command you use to start the container. In case you use docker-compose to start the container, then please provide the docker-compose.yml instead.
Actually, you’re right, I asked the question very generally, I have a docker image, and I configure it as an environment variable and upload it to the Internet. My request here was that it was still working when I made changes to localhost when it was broadcasting from that port
I think it is still not enough. Please, share an example step by step with sharable configuration files and commands. For example:
- My goal was to…
- Here is how I tried:
docker compose up -d
- My compose file is:
it worked.services: server: # ....
- Then I changed the IP in the 13th line from X to Y.
- This is my current compose file after the change:
Paste your new code here
- I ran this command:
docker compose up -d
- It failed with the following error message:
Paste your error message here
Don’t forget to format your message properly: