Localhost in change port

ı have a container but ı want to, changing to localhost port how can ı do

1 Like

i have a port that works in localhost, but when I change the port, I want it to continue working in localhost

1 Like

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:

  1. My goal was to…
  2. Here is how I tried:
    docker compose up -d
  3. My compose file is:
         # ....
    it worked.
  4. Then I changed the IP in the 13th line from X to Y.
  5. This is my current compose file after the change:
    Paste your new code here
  6. I ran this command:
    docker compose up -d
  7. It failed with the following error message:
    Paste your error message here

Don’t forget to format your message properly:

1 Like