-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port Mapping #20
Comments
It seems that you need to fix your docker command line to expose container port 4000 as host port 4001. Something like -p 4001:4000 |
prometheus-mssql-exporter/index.js Line 21 in 297e0b7
|
Dockerfile does not actually publish the port but only suggests to docker which ports will be available but it is up to the application based on configuration to actually make those ports actually functional and using the -p parameter will do the actual publishing. As @cobolbaby suggested, you can map any external port to the same internal port such as -p 4001:4000 or -p 4002:4000 etc. |
I am running two instances of the container.
Container 1 - working fine, listening to port 4000 and receiving metrics from MS SQL Server1
Container 2 - is not working since it is trying to listen to port 4000 though I have mapped to port 4001 by using the following command to listen to MS SQL Server2
docker run -e SERVER=192.168.56.101 -e USERNAME=SA -e PASSWORD=qkD4x3yy -e DEBUG=app -p 4001:4001 --name prometheus-mssql-exporter awaragi/prometheus-mssql-exporter
Please suggest.
The text was updated successfully, but these errors were encountered: