Class DockerPlatform

  • All Implemented Interfaces:
    com.oracle.bedrock.extensible.Extensible, com.oracle.bedrock.runtime.Infrastructure, com.oracle.bedrock.runtime.Platform
    Direct Known Subclasses:
    DockerMachinePlatform

    public class DockerPlatform
    extends com.oracle.bedrock.runtime.AbstractPlatform
    A Platform that can execute Docker commands using a specific Docker environment.

    Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

    Author:
    Jonathan Knight
    • Constructor Detail

      • DockerPlatform

        public DockerPlatform​(com.oracle.bedrock.runtime.Platform clientPlatform,
                              Docker docker,
                              com.oracle.bedrock.Option... options)
        Constructs a DockerPlatform.
        Parameters:
        clientPlatform - the client Platform
        docker - the Docker
        options - the Options
      • DockerPlatform

        public DockerPlatform​(String name,
                              com.oracle.bedrock.runtime.Platform clientPlatform,
                              Docker docker,
                              com.oracle.bedrock.Option... options)
        Constructs a DockerPlatform with a specific name.
        Parameters:
        name - the name
        clientPlatform - the client Platform
        docker - the Docker
        options - the Options
    • Method Detail

      • getClientPlatform

        public com.oracle.bedrock.runtime.Platform getClientPlatform()
        Obtain the Platform that is used to run Docker client commands.
        Returns:
        the Platform that is used to run Docker client commands
      • getOperatingSystem

        public com.oracle.bedrock.runtime.OperatingSystem getOperatingSystem()
      • launch

        public <A extends com.oracle.bedrock.runtime.Application> A launch​(com.oracle.bedrock.runtime.MetaClass<A> metaClass,
                                                                           com.oracle.bedrock.Option... options)
        Specified by:
        launch in interface com.oracle.bedrock.runtime.Platform
        Overrides:
        launch in class com.oracle.bedrock.runtime.AbstractPlatform
      • getApplicationLauncher

        protected <A extends com.oracle.bedrock.runtime.Application,​B extends com.oracle.bedrock.runtime.ApplicationLauncher<A>> B getApplicationLauncher​(com.oracle.bedrock.runtime.MetaClass<A> metaClass,
                                                                                                                                                                com.oracle.bedrock.OptionsByType optionsByType)
                                                                                                                                                         throws UnsupportedOperationException
        Specified by:
        getApplicationLauncher in class com.oracle.bedrock.runtime.AbstractPlatform
        Throws:
        UnsupportedOperationException
      • localClient

        public static DockerPlatform localClient()
        Obtain a DockerPlatform using the LocalPlatform as the client Platform and automatically configuring the Docker environment.
        Returns:
        a DockerPlatform using the LocalPlatform as the client Platform
      • localClient

        public static DockerPlatform localClient​(Docker environment)
        Obtain a DockerPlatform using the LocalPlatform as the client Platform and using the specified Docker environment.
        Parameters:
        environment - the Docker environment to use when executing Docker commands
        Returns:
        a DockerPlatform using the LocalPlatform as the client Platform and the specified Docker environment
      • clientAt

        public static DockerPlatform clientAt​(com.oracle.bedrock.runtime.Platform platform,
                                              Docker environment)
        Obtain a DockerPlatform using the specified client Platform and Docker environment.
        Parameters:
        platform - the Platform to execute Docker client commands on
        environment - the Docker environment to use when executing Docker commands
        Returns:
        a DockerPlatform using the specified client Platform and Docker environment