public String createAndStartContainer(ImageConfiguration imageConfig,
                                          PortMapping portMapping,
                                          GavLabel gavLabel,
                                          Properties properties,
                                          File baseDir,
                                          String defaultContainerNamePattern,
                                          Date buildTimestamp) throws DockerAccessException {
        String id = createContainer(imageConfig, portMapping, gavLabel, properties, baseDir,
                defaultContainerNamePattern, buildTimestamp);
        startContainer(imageConfig, id, gavLabel);

        if (portMapping.needsPropertiesUpdate()) {
            updateMappedPortsAndAddresses(id, portMapping);
        }

        return id;
    }
Create and start a container with the given image configuration.

@param imageConfig image configuration holding the run information and the image name
@param portMapping container port mapping
@param gavLabel label to tag the started container with
@param properties properties to fill in with dynamically assigned ports
@param defaultContainerNamePattern pattern to use for naming containers. Can be null in which case a default pattern is used
@param buildTimestamp date which should be used as the timestamp when calculating container names
@return the container id

@throws DockerAccessException if access to the docker backend fails
src/main/java/io/fabric8/maven/docker/service/RunService.java