createContainer method

  1. @override
Future<C> createContainer(
  1. DockerCommander dockerCommander
)
override

DockerContainer creation implementation.

Implementation

@override
Future<C> createContainer(DockerCommander dockerCommander) async {
  var dbPort = await this.dbPort;

  _log.info('Initializing $dbType container at port: $dbPort');

  var containerConfig = createDBContainerConfig(dbPort);

  var container = await containerConfig.run(dockerCommander,
      name: '${containerNamePrefix}_$dbPort', cleanContainer: true);

  _log.info('Container initialized: $container');

  return container;
}