Class Docker.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.circleci.Docker.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Docker.Builderauth(Map<String,String> auth)Sets the value ofDocker.getAuth()Docker.BuilderawsAuth(Map<String,String> awsAuth)Sets the value ofDocker.getAwsAuth()Dockerbuild()Builds the configured instance.Docker.Buildercommand(List<String> command)Sets the value ofDocker.getCommand()Docker.Builderentrypoint(List<String> entrypoint)Sets the value ofDocker.getEntrypoint()Docker.Builderenvironment(Map<String,? extends Object> environment)Sets the value ofDocker.getEnvironment()Docker.Builderimage(String image)Sets the value ofDocker.getImage()Docker.Buildername(String name)Sets the value ofDocker.getName()Docker.Builderuser(String user)Sets the value ofDocker.getUser()
-
-
-
Method Detail
-
image
@Stability(Experimental) public Docker.Builder image(String image)
Sets the value ofDocker.getImage()- Parameters:
image- The name of a custom docker image to use. This parameter is required.- Returns:
this
-
auth
@Stability(Experimental) public Docker.Builder auth(Map<String,String> auth)
Sets the value ofDocker.getAuth()- Parameters:
auth- Authentication for registries using standard docker login credentials.- Returns:
this
-
awsAuth
@Stability(Experimental) public Docker.Builder awsAuth(Map<String,String> awsAuth)
Sets the value ofDocker.getAwsAuth()- Parameters:
awsAuth- Authentication for AWS Elastic Container Registry (ECR).- Returns:
this
-
command
@Stability(Experimental) public Docker.Builder command(List<String> command)
Sets the value ofDocker.getCommand()- Parameters:
command- The command used as pid 1 (or args for entrypoint) when launching the container.- Returns:
this
-
entrypoint
@Stability(Experimental) public Docker.Builder entrypoint(List<String> entrypoint)
Sets the value ofDocker.getEntrypoint()- Parameters:
entrypoint- The command used as executable when launching the container.- Returns:
this
-
environment
@Stability(Experimental) public Docker.Builder environment(Map<String,? extends Object> environment)
Sets the value ofDocker.getEnvironment()- Parameters:
environment- A map of environment variable names and values.- Returns:
this
-
name
@Stability(Experimental) public Docker.Builder name(String name)
Sets the value ofDocker.getName()- Parameters:
name- The name the container is reachable by. By default, container services are accessible through localhost- Returns:
this
-
user
@Stability(Experimental) public Docker.Builder user(String user)
Sets the value ofDocker.getUser()- Parameters:
user- Which user to run commands as within the Docker container.- Returns:
this
-
build
@Stability(Experimental) public Docker build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<Docker>- Returns:
- a new instance of
Docker - Throws:
NullPointerException- if any required attribute was not provided
-
-