forked from gmpassos/docker_commander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker_commander.dart
37 lines (34 loc) · 1.22 KB
/
docker_commander.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import 'package:docker_commander/docker_commander_vm.dart';
import 'package:docker_commander/src/executables/docker_commander_console.dart'
as docker_commander_console;
import 'package:docker_commander/src/executables/docker_commander_server.dart'
as docker_commander_server;
void showHelp() {
print(
'-----------------------------------------------------------------------------');
print('| docker_commander - version ${DockerCommander.VERSION}');
print(
'-----------------------------------------------------------------------------');
print('');
print('SERVER MODE:\n');
print(
' \$> docker_commander --server %username %password %port? --public/private? --ipv6? --production?');
print('');
print('CONSOLE MODE:');
print(' \$> docker_commander --console %username %serverHost %serverPort');
print('');
}
void main(List<String> args) async {
var console = args.contains('--console');
var server = args.contains('--server');
if (console) {
print('<CONSOLE MODE>');
docker_commander_console.main(args);
} else if (server) {
print('<SERVER MODE>');
docker_commander_server.main(args);
} else {
print('<DEFAULT MODE: SERVER>');
docker_commander_server.main(args);
}
}