1
0
Fork 0

Expose ContainerName in Docker provider

This commit is contained in:
Thomas Quinot 2023-03-20 17:42:06 +01:00 committed by GitHub
parent 99d779a546
commit 4bc2305ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -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)