Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ type RuntimeContainer struct {
Gateway string
Name string
Hostname string
NetworkMode string
Image DockerImage
Env map[string]string
Volumes map[string]Volume
Expand Down
1 change: 1 addition & 0 deletions internal/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ func (g *generator) getContainers() ([]*context.RuntimeContainer, error) {
Name: strings.TrimLeft(container.Name, "/"),
Hostname: container.Config.Hostname,
Gateway: container.NetworkSettings.Gateway,
NetworkMode: container.HostConfig.NetworkMode,
Addresses: []context.Address{},
Networks: []context.Network{},
Env: make(map[string]string),
Expand Down
3 changes: 3 additions & 0 deletions internal/generator/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func TestGenerateFromEvents(t *testing.T) {
Cmd: []string{"/bin/sh"},
Image: "base:latest",
},
HostConfig: &docker.HostConfig{
NetworkMode: "container:d246e2c9e3d465d96359c942e91de493f6d51a01ba33900d865180d64c34ee91",
},
State: docker.State{
Running: true,
Pid: 400,
Expand Down