APT/Docker manage

- view apt update
- view docker container
This commit is contained in:
Junyuan Feng
2022-03-08 14:47:57 +08:00
parent b800bd91fd
commit 34e6b99297
20 changed files with 519 additions and 42 deletions

View File

@@ -0,0 +1,29 @@
class DockerPsItem {
late String containerId;
late String image;
late String command;
late String created;
late String status;
late String ports;
late String name;
DockerPsItem(this.containerId, this.image, this.command, this.created,
this.status, this.ports, this.name);
DockerPsItem.fromRawString(String rawString) {
final List<String> parts = rawString.split(' ');
containerId = parts[0];
image = parts[1];
command = parts[2];
created = parts[3];
status = parts[4];
ports = parts[5];
if (running && parts.length == 9) {
name = parts[8];
} else {
name = parts[6];
}
}
bool get running => status.contains('Up ');
}