Class DockerImage

  • All Implemented Interfaces:
    com.oracle.bedrock.extensible.Feature, com.oracle.bedrock.runtime.ApplicationListener<com.oracle.bedrock.runtime.Application>

    public class DockerImage
    extends Object
    implements com.oracle.bedrock.extensible.Feature, com.oracle.bedrock.runtime.ApplicationListener<com.oracle.bedrock.runtime.Application>
    A representation of a Docker image.

    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

      • DockerImage

        public DockerImage​(List<String> tags,
                           com.oracle.bedrock.OptionsByType optionsByType)
        Create a DockerImage.
        Parameters:
        tags - the tags to identify this image
        optionsByType - the OptionsByType used to build this image
    • Method Detail

      • getApplication

        public com.oracle.bedrock.runtime.Application getApplication()
      • getOptions

        public com.oracle.bedrock.OptionsByType getOptions()
        Obtain the OptionsByType used to build this image.
        Returns:
        the OptionsByType used to build this image
      • getTags

        public List<String> getTags()
        Obtain the tags to identify this image.
        Returns:
        the tags to identify this image
      • getFirstTag

        public String getFirstTag()
        Obtain the first of the tags used to identify this image.
        Returns:
        the first of the tags used to identify this image
      • inspect

        public javax.json.JsonValue inspect()
        Obtain information about this DockerImage as a JsonArray.

        The JsonArray will have a single entry that is the JSON representation of this DockerImage's state.

        This equates to running the docker inspect command for this DockerImage.

        Returns:
        information about this DockerImage as a JsonArray
      • remove

        public boolean remove()
        Remove this DockerImage.

        This equates to running the docker rmi command for this DockerImage.

        Returns:
        true if the remove was successful, false otherwise
      • onAddingTo

        public void onAddingTo​(com.oracle.bedrock.extensible.Extensible extensible)
        Specified by:
        onAddingTo in interface com.oracle.bedrock.extensible.Feature
      • onRemovingFrom

        public void onRemovingFrom​(com.oracle.bedrock.extensible.Extensible extensible)
        Specified by:
        onRemovingFrom in interface com.oracle.bedrock.extensible.Feature
      • onLaunched

        public void onLaunched​(com.oracle.bedrock.runtime.Application application)
        Specified by:
        onLaunched in interface com.oracle.bedrock.runtime.ApplicationListener<com.oracle.bedrock.runtime.Application>
      • onClosing

        public void onClosing​(com.oracle.bedrock.runtime.Application application,
                              com.oracle.bedrock.OptionsByType optionsByType)
        Specified by:
        onClosing in interface com.oracle.bedrock.runtime.ApplicationListener<com.oracle.bedrock.runtime.Application>
      • onClosed

        public void onClosed​(com.oracle.bedrock.runtime.Application application,
                             com.oracle.bedrock.OptionsByType optionsByType)
        Specified by:
        onClosed in interface com.oracle.bedrock.runtime.ApplicationListener<com.oracle.bedrock.runtime.Application>