From 5a465b06cd11ee36216b9f7a3a4a9cb6f13ed1cb Mon Sep 17 00:00:00 2001 From: JamBalaya56562 Date: Fri, 19 Jun 2026 00:04:38 +0900 Subject: [PATCH] feat: expose network aliases to templates Co-Authored-By: Claude Opus 4.8 --- README.md | 1 + internal/context/context.go | 1 + internal/generator/generator.go | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index de2fb5be..4fc06725 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,7 @@ type Address struct { type Network struct { IP string Name string + Aliases []string Gateway string EndpointID string IPv6Gateway string diff --git a/internal/context/context.go b/internal/context/context.go index de283f94..40817699 100644 --- a/internal/context/context.go +++ b/internal/context/context.go @@ -55,6 +55,7 @@ func SetDockerEnv(d *docker.Env) { type Network struct { IP string Name string + Aliases []string Gateway string EndpointID string IPv6Gateway string diff --git a/internal/generator/generator.go b/internal/generator/generator.go index 613d7924..be1e2d6d 100644 --- a/internal/generator/generator.go +++ b/internal/generator/generator.go @@ -460,6 +460,7 @@ func (g *generator) getContainers(config config.Config) ([]*context.RuntimeConta network := context.Network{ IP: v.IPAddress, Name: k, + Aliases: append([]string{}, v.Aliases...), Gateway: v.Gateway, EndpointID: v.EndpointID, IPv6Gateway: v.IPv6Gateway,