mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#42 new: docker logs
This commit is contained in:
@@ -163,6 +163,14 @@ class DockerProvider extends BusyProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<String> logs(String id) async {
|
||||
setBusyState();
|
||||
final cmd = _wrap('docker logs $id');
|
||||
final result = await client!.run(cmd);
|
||||
setBusyState(false);
|
||||
return result.string;
|
||||
}
|
||||
|
||||
// judge whether to use DOCKER_HOST / sudo
|
||||
String _wrap(String cmd) {
|
||||
final dockerHost = dockerStore.getDockerHost(hostId!);
|
||||
|
||||
Reference in New Issue
Block a user