fix(docker): migrate single-node compose from host to bridge networking#2952
Open
bitflicker64 wants to merge 2 commits intoapache:masterfrom
Open
fix(docker): migrate single-node compose from host to bridge networking#2952bitflicker64 wants to merge 2 commits intoapache:masterfrom
bitflicker64 wants to merge 2 commits intoapache:masterfrom
Conversation
Replace network_mode: host with explicit port mappings and add configuration volumes for PD, Store, and Server services to support macOS/Windows Docker. - Remove host network mode from all services - Add explicit port mappings (8620, 8520, 8080) - Add configuration directories with volume mounts - Update healthcheck endpoints - Add PD peers environment variable Enables HugeGraph cluster to run on all Docker platforms.
Open
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the PR
Fix single node Docker deployment failing on macOS and Windows due to Linux only host networking.
close #2951
Main Changes
Remove network_mode host from single node docker compose setup
Use default bridge networking
Add explicit port mappings
Add configuration volume mounts
Replace localhost and non routable addresses with container hostnames
Update healthcheck endpoints
Problem
The original single node Docker configuration uses network_mode host.
This only works on native Linux. Docker Desktop on macOS and Windows does not implement host networking the same way. Containers start but HugeGraph services advertise incorrect addresses such as 127.0.0.1 or 0.0.0.0.
Resulting failures:
The issue is not process failure but invalid service discovery and advertised endpoints.
Root Cause
Solution
Switch to bridge networking and advertise container resolvable hostnames.
Docker DNS resolves service names automatically. Services bind normally while exposing correct internal endpoints.
Verification
Observed behavior after changes on Docker Desktop macOS:
Container state
Server startup sequence
Hugegraph server are waiting for storage backend Initializing HugeGraph Store Starting HugeGraphServer ... OK StartedEndpoints
Server:
Returns service metadata.
Store:
Returns non zero leader and partition count:
{"leaderCount":12,"partitionCount":12}PD:
Returns expected auth response, confirming service availability.
Cluster becomes operational after initialization delay.
Why This Works
Does this PR potentially affect the following parts
Documentation Status