new: force delete docker container

This commit is contained in:
lollipopkit
2023-11-22 00:17:19 -06:00
parent b696cdff08
commit d1d11e7b70
6 changed files with 76 additions and 31 deletions

View File

@@ -239,7 +239,8 @@ enum DockerCmdType {
}
}
static final execAll = values.map((e) => e.exec).join(' && echo $seperator && ');
static final execAll =
values.map((e) => e.exec).join(' && echo $seperator && ');
}
enum BSDStatusCmdType {

View File

@@ -137,7 +137,12 @@ class DockerProvider extends ChangeNotifier {
Future<DockerErr?> start(String id) async => await run('docker start $id');
Future<DockerErr?> delete(String id) async => await run('docker rm $id');
Future<DockerErr?> delete(String id, bool force) async {
if (force) {
return await run('docker rm -f $id');
}
return await run('docker rm $id');
}
Future<DockerErr?> restart(String id) async =>
await run('docker restart $id');

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 645;
static const int build = 646;
static const String engine = "3.16.0";
static const String buildAt = "2023-11-20 16:47:25";
static const int modifications = 5;
static const int script = 27;
static const String buildAt = "2023-11-23 00:07:00";
static const int modifications = 7;
static const int script = 28;
}