com.github.dockerjava.client.command
Class CreateContainerCmd
java.lang.Object
com.github.dockerjava.client.command.AbstrDockerCmd<CreateContainerCmd,ContainerCreateResponse>
com.github.dockerjava.client.command.CreateContainerCmd
- All Implemented Interfaces:
- DockerCmd<ContainerCreateResponse>
public class CreateContainerCmd
- extends AbstrDockerCmd<CreateContainerCmd,ContainerCreateResponse>
Creates a new container.
CreateContainerCmd
public CreateContainerCmd(String image)
CreateContainerCmd
public CreateContainerCmd(CreateContainerConfig config)
getName
public String getName()
withImage
public CreateContainerCmd withImage(String image)
withCmd
public CreateContainerCmd withCmd(String... cmd)
withVolumes
public CreateContainerCmd withVolumes(Volume... volumes)
withVolumesFrom
public CreateContainerCmd withVolumesFrom(String... volumesFrom)
withEnv
public CreateContainerCmd withEnv(String... env)
withHostName
public CreateContainerCmd withHostName(String hostName)
withName
public CreateContainerCmd withName(String name)
withExposedPorts
public CreateContainerCmd withExposedPorts(ExposedPort... exposedPorts)
toString
public String toString()
- Overrides:
toString
in class Object
impl
protected ContainerCreateResponse impl()
Copyright © 2014. All rights reserved.