Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Frage zum Docker Image #14

Closed
ghost opened this issue Dec 18, 2017 · 2 comments
Closed

Frage zum Docker Image #14

ghost opened this issue Dec 18, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 18, 2017

Hallo

ich hätte eine kurze Frage zum Docker-Image:
docker run -d -p 4000:4000 --net="host" --env-file .env --name mailman phiilu/mailman

Beim verwenden des Parameters --net="host" wird der Port auf dem Host normalerweise auf die IP 0.0.0.0 gebindet und ist somit öffentlich erreichbar. Wieso ist das hier nicht der Fall?

!/bin/bash# netstat -ant | grep 4000
tcp 0 0 127.0.0.1:4000 0.0.0.0:* LISTEN

Wenn ich den Befehl wie folgt anpasse, ändert sich an der Ausgabe von netstat nichts, jedoch ist Mailman nicht länger erreichbar:
docker run -d -p 127.0.0.1:4000:4000 --env-file .env --name mailman phiilu/mailman

Warum?

@phiilu
Copy link
Owner

phiilu commented Dec 19, 2017

Hi

Es wird 127.0.0.1 in netstat angezeigt, da wahrscheinlich in deiner .env Datei MAILMAN_HOST auf 127.0.0.1 gesetzt ist. Dass sorgt dafür, dass das Mailman auf localhost bindet. Du kannst diese Variable auf 0.0.0.0 setzen, wenn du auf alle Interfaces binden möchtest. Siehe #10

@ghost
Copy link
Author

ghost commented Dec 19, 2017

Ah alles klar. Danke!

@ghost ghost closed this as completed Dec 19, 2017
This issue was closed.
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

1 participant