Expose ContainerName in Docker provider
This commit is contained in:
parent
99d779a546
commit
4bc2305ed3
2 changed files with 11 additions and 8 deletions
|
@ -74,11 +74,13 @@ func (p *Provider) buildConfiguration(ctx context.Context, containersInspected [
|
|||
serviceName := getServiceName(container)
|
||||
|
||||
model := struct {
|
||||
Name string
|
||||
Labels map[string]string
|
||||
Name string
|
||||
ContainerName string
|
||||
Labels map[string]string
|
||||
}{
|
||||
Name: serviceName,
|
||||
Labels: container.Labels,
|
||||
Name: serviceName,
|
||||
ContainerName: strings.TrimPrefix(container.Name, "/"),
|
||||
Labels: container.Labels,
|
||||
}
|
||||
|
||||
provider.BuildRouterConfiguration(ctx, confFromLabel.HTTP, serviceName, p.defaultRuleTpl, model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue