Skip to content

Commit

Permalink
Fix ephemeral bridge network name for podman
Browse files Browse the repository at this point in the history
See #2219 (comment)

Signed-off-by: Natalie Arellano <[email protected]>
  • Loading branch information
natalieparellano committed Jul 31, 2024
1 parent a651c5d commit 6bf1947
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/build/lifecycle_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (l *LifecycleExecution) Run(ctx context.Context, phaseFactoryCreator PhaseF
if l.os == "windows" {
driver = "nat"
}
networkName := fmt.Sprintf("pack.local/network/%x", randString(10))
networkName := fmt.Sprintf("pack.local-network-%x", randString(10))
resp, err := l.docker.NetworkCreate(ctx, networkName, types.NetworkCreate{
Driver: driver,
})
Expand Down
2 changes: 1 addition & 1 deletion internal/build/lifecycle_execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ func testLifecycleExecution(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, err)

for _, entry := range fakePhaseFactory.NewCalledWithProvider {
h.AssertContains(t, string(entry.HostConfig().NetworkMode), "pack.local/network/")
h.AssertContains(t, string(entry.HostConfig().NetworkMode), "pack.local-network-")
h.AssertEq(t, entry.HostConfig().NetworkMode.IsDefault(), false)
h.AssertEq(t, entry.HostConfig().NetworkMode.IsHost(), false)
h.AssertEq(t, entry.HostConfig().NetworkMode.IsNone(), false)
Expand Down

0 comments on commit 6bf1947

Please sign in to comment.