public abstract Builder volumes(final String... volumes);
.stopSignal(stopSignal) .networkingConfig(networkingConfig) .volumes(volumes) .portSpecs(portSpecs) .exposedPorts(exposedPorts)
containerConfigBuilder.volumes(volumesBuilder.build());
.stopSignal(stopSignal) .networkingConfig(networkingConfig) .volumes(volumes) .portSpecs(portSpecs) .exposedPorts(exposedPorts)
/** * Create docker container configuration for a job. * @param imageInfo The ImageInfo object. * @param properties Properties to resolve against. * @return The ContainerConfig object. */ public ContainerConfig containerConfig(final ImageInfo imageInfo, final Map<String, String> properties) { final ContainerConfig.Builder builder = ContainerConfig.builder(); builder.image(job.getImage()); builder.hostname(job.getHostname()); builder.cmd(containerCmdStrings(properties)); builder.hostname(containerHostname(properties)); builder.env(containerEnvStrings()); builder.exposedPorts(containerExposedPorts()); builder.volumes(volumes()); for (final ContainerDecorator decorator : containerDecorators) { decorator.decorateContainerConfig(job, imageInfo, builder); } return builder.build(); }
public abstract Builder volumes(final String... volumes);
/** * Create docker container configuration for a job. * * @param imageInfo The ImageInfo object. * * @return The ContainerConfig object. */ public ContainerConfig containerConfig(final ImageInfo imageInfo, final Optional<String> dockerVersion) { final ContainerConfig.Builder builder = ContainerConfig.builder(); builder.image(job.getImage()); builder.cmd(job.getCommand()); builder.hostname(job.getHostname()); builder.env(containerEnvStrings()); builder.exposedPorts(containerExposedPorts()); builder.volumes(volumes().keySet()); builder.labels(job.getLabels()); for (final ContainerDecorator decorator : containerDecorators) { decorator.decorateContainerConfig(job, imageInfo, dockerVersion, builder); } return builder.build(); }