Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Running concurrent containers : Cant access webpage #50

Closed
PrawnMan opened this issue Jan 15, 2020 · 3 comments
Closed

Running concurrent containers : Cant access webpage #50

PrawnMan opened this issue Jan 15, 2020 · 3 comments

Comments

@PrawnMan
Copy link

PrawnMan commented Jan 15, 2020

Aim : Run Concurrent Containers to allow multiple LAN users to use my server.
Methodology: Previously installed application via docker as per readme. Issued command to run the first server as per instruction:

docker run -d \
  --name 7Eleven_Fuel \
  -p 5000:5000 \
  fuellock

Docker launches application and web interface is available on serverIp:5000 as expected.

Then I try to run a second concurrent instance on a different port:

docker run -d --name 7Eleven_Fuel_2 -p 5001:5001 fuellock

Terminal reports that the program is running.

Expected outcome: Webpage accessible on serverip:5001

Actual outcome:
I try to access the web interface on serverip:5001.

The page does not display showing "ERR_CONNECTION_REFUSED"

Output from terminal at this point:


CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                   PORTS                    NAMES
e14cdfc78636        fuellock              "python app.py"     13 minutes ago      Up 13 minutes            0.0.0.0:5001->5001/tcp   7Eleven_Fuel_2
734d39f3d740        fuellock              "python app.py"     3 weeks ago         Up 8 days                0.0.0.0:5000->5000/tcp   7Eleven_Fuel

.

Host: Linux ionic 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

@m1ckyb
Copy link

m1ckyb commented Jan 15, 2020

You have to keep the port of the container the same and change the exposed port

docker run -d --name 7Eleven_Fuel_2 -p 5001:5000 fuellock

As the port is not changed in the container

@PrawnMan
Copy link
Author

PrawnMan commented Jan 15, 2020

You have to keep the port of the container the same and change the exposed port

docker run -d --name 7Eleven_Fuel_2 -p 5001:5000 fuellock

As the port is not changed in the container

That's what I was doing incorrectly. Cheers for correcting me. Tried it and it works perfectly now.

EDIT: Sorry, I dont know how to close this or mark it as resolved?

@PrawnMan
Copy link
Author

close #50

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants