Skip to content

Pointing to other Docker Images or host #4531

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

Open
RemyDG0 opened this issue May 8, 2025 · 4 comments
Open

Pointing to other Docker Images or host #4531

RemyDG0 opened this issue May 8, 2025 · 4 comments

Comments

@RemyDG0
Copy link

RemyDG0 commented May 8, 2025

I can't fin a way to make my Nginx Proxy manager to point directly to a specific image or to the host itself.
The only short term solution I found was to fill the IP address of my machine. But I am soon to move my machine to another network and the IP range is not the same, I will have to change it in the fields of every proxy entry I made.

Since I work within TrueNAS I already submitted this issue on their page but it seems that my issue is not specific to TrueNAS or that people there did not run in the same trouble as me...
truenas/apps#2071

It might be linked to #3050 but I don't think it is exactly the same thing.

I am in a position I expect my issue to be in the category "too obvious to be seen" or that I miss explained it.

@twnki
Copy link

twnki commented May 12, 2025

I believe if you have created an external network in docker and have attached NPM and your destination container to it, you can just use the container name in NPM instead of resorting to archaic IP addresses.

@RemyDG0
Copy link
Author

RemyDG0 commented May 12, 2025

I am not familiar to the notion "external network in docker" and I am not sure that I have made one, or how to do so.

For some "apps" (as TrueNas present docker packages), such as WordPress contains multiple docker, therefore do not have the tick "Host network".
Image

Is it a wider problem on the side of way that TrueNAS handle docker network ? @twnki

Does the use of IP address add latency ?

@agilityprop
Copy link

"External" network in docker just means that the network the container is connecting to already exists at the time the container is launched.

For example, you might have an service, 'app1', running from a compose.yaml specification which creates a network, "network1".

Now you wish to deploy another service and want the containers to be able to communicate, you can specify 'external: true' in its compose.yaml and have the second service's container joined to the first's instead of a new default network.

Say if your first service, 'app1' created a network, 'network1' you could specify 'external: true' and 'name: network1' on app2's compose.yaml and at container runtime Docker will look for a network called 'network1' and connect app2 to it.

In this case, the services can talk to each other using service name in any place where a hostname is needed.

Suggest reviewing the documentation on container networking for more information.

@RemyDG0
Copy link
Author

RemyDG0 commented May 15, 2025

"External" network in docker just means that the network the container is connecting to already exists at the time the container is launched.

For example, you might have an service, 'app1', running from a compose.yaml specification which creates a network, "network1".

Now you wish to deploy another service and want the containers to be able to communicate, you can specify 'external: true' in its compose.yaml and have the second service's container joined to the first's instead of a new default network.

Say if your first service, 'app1' created a network, 'network1' you could specify 'external: true' and 'name: network1' on app2's compose.yaml and at container runtime Docker will look for a network called 'network1' and connect app2 to it.

In this case, the services can talk to each other using service name in any place where a hostname is needed.

Suggest reviewing the documentation on container networking for more information.

Thanks, I will investigate further and come back when I figured how to formulate my issue if I did not find the answer.

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

No branches or pull requests

3 participants