Docker Containers with same port address


Recommended Posts

I have noticed a few docker containers that have the same internal port setting 8080. Good example is sabnzbd and headphones all have same port setting as 8080 on the container side. What can be done to correct this?

 

*** Removed sickbeard as its on different port sorry ***

Link to comment

I have noticed a few docker containers that have the same internal port setting 8080. Good example is sabnzbd and headphones all have same port setting as 8080 on the container side. What can be done to correct this?

I do not see this as being an issue as the Docker RUN command can map any port internal to the container to a different port at the external level, thus avoiding collisions at the host level.  The important point is that the instructions for each container document what ports have been used within the container.

Link to comment

I have noticed a few docker containers that have the same internal port setting 8080. Good example is sabnzbd and headphones all have same port setting as 8080 on the container side. What can be done to correct this?

 

*** Removed sickbeard as its on different port sorry ***

 

Well, for the savvy that's easy, but not if we want to make these dockers easy to use and deploy. Talk to the maintainer of the docker and see if he/she is willing to change it.

 

I think we can track the ports already used, so new dockers could just avoid reusing them.

Link to comment

No please dont do that. Having the container port the expected port and allowing the user to map it to a real port is docker best practice.

 

More than that it is one of the conerstones of portability and scalability.

 

If there is a user problem (which i agree there probably is) we should fix this is the user interface.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.