mirror of
				https://github.com/docker/compose.git
				synced 2025-11-04 05:34:09 +01:00 
			
		
		
		
	Merge pull request #1434 from docker/PortBindings
set PortBinding HostIP
This commit is contained in:
		
						commit
						3f502000e2
					
				@ -366,7 +366,9 @@ func buildContainerPortBindingOptions(s types.ServiceConfig) nat.PortMap {
 | 
				
			|||||||
	for _, port := range s.Ports {
 | 
						for _, port := range s.Ports {
 | 
				
			||||||
		p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
 | 
							p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
 | 
				
			||||||
		bind := []nat.PortBinding{}
 | 
							bind := []nat.PortBinding{}
 | 
				
			||||||
		binding := nat.PortBinding{}
 | 
							binding := nat.PortBinding{
 | 
				
			||||||
 | 
								HostIP: port.HostIP,
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		if port.Published > 0 {
 | 
							if port.Published > 0 {
 | 
				
			||||||
			binding.HostPort = fmt.Sprint(port.Published)
 | 
								binding.HostPort = fmt.Sprint(port.Published)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user