Class Docker.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Docker>
    Enclosing interface:
    Docker

    @Stability(Experimental)
    public static final class Docker.Builder
    extends Object
    implements software.amazon.jsii.Builder<Docker>
    A builder for Docker
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • image

        @Stability(Experimental)
        public Docker.Builder image​(String image)
        Sets the value of Docker.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 of Docker.getAuth()
        Parameters:
        auth - Authentication for registries using standard docker login credentials.
        Returns:
        this
      • command

        @Stability(Experimental)
        public Docker.Builder command​(List<String> command)
        Sets the value of Docker.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 of Docker.getEntrypoint()
        Parameters:
        entrypoint - The command used as executable when launching the container.
        Returns:
        this
      • name

        @Stability(Experimental)
        public Docker.Builder name​(String name)
        Sets the value of Docker.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 of Docker.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:
        build in interface software.amazon.jsii.Builder<Docker>
        Returns:
        a new instance of Docker
        Throws:
        NullPointerException - if any required attribute was not provided