Skip to content

Commit

Permalink
fix: autoremove container in examples (#314)
Browse files Browse the repository at this point in the history
When running the examples they leave unnecessary containers hanging
around. Add AutoRemove: true, to automatically remove them.
  • Loading branch information
egonelbre authored Nov 11, 2024
1 parent c39f57f commit 51a9a54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/emulator_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func startEmulator() error {
Image: "gcr.io/cloud-spanner-emulator/emulator",
ExposedPorts: nat.PortSet{"9010": {}},
}, &container.HostConfig{
AutoRemove: true,
PortBindings: map[nat.Port][]nat.PortBinding{"9010": {{HostIP: "0.0.0.0", HostPort: "9010"}}},
}, nil, nil, "")
if err != nil {
Expand Down

0 comments on commit 51a9a54

Please sign in to comment.