19 lines
515 B
Dart
19 lines
515 B
Dart
import 'package:podman/podman.dart';
|
|
|
|
Future<void> main() async {
|
|
final client = PodmanClient();
|
|
|
|
await client.pull('docker.io/library/hello-world:latest', quiet: true);
|
|
|
|
final containerId = await client.run(
|
|
const RunOptions(
|
|
image: 'docker.io/library/hello-world:latest',
|
|
name: 'podman_package_example_hello_world',
|
|
labels: <String, String>{'example': 'podman-package'},
|
|
removeWhenStopped: true,
|
|
),
|
|
);
|
|
|
|
print('Started container: $containerId');
|
|
await client.close();
|
|
}
|