I don't think this code should be in DockerClient. Could you instead fire an event, and react to it in the appropriate page?