Skip to content

Commit

Permalink
fix(docker): can not get container ip
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Aug 15, 2023
1 parent b90da7e commit 9d13e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GZCTF/Services/Container/Manager/DockerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ await _client.Images.CreateImageAsync(new()

container.StartedAt = DateTimeOffset.Parse(info.State.StartedAt);
container.ExpectStopAt = container.StartedAt + TimeSpan.FromHours(2);
container.IP = info.NetworkSettings.IPAddress;
container.IP = info.NetworkSettings.Networks.FirstOrDefault().Value.IPAddress;
container.Port = config.ExposedPort;
container.IsProxy = !_meta.ExposePort;

Expand Down

0 comments on commit 9d13e1a

Please sign in to comment.