some refactoring
This commit is contained in:
@ -4,6 +4,6 @@ module DockerContainerMixin
|
||||
end
|
||||
|
||||
def port_bindings
|
||||
json['HostConfig']['PortBindings']
|
||||
json['HostConfig']['PortBindings'].try(:map) { |key, value| [key.to_i, value.first['HostPort'].to_i] }.to_h
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user