Class DockerImage
- java.lang.Object
-
- com.oracle.bedrock.runtime.docker.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 Summary
Constructors Constructor Description DockerImage(List<String> tags, com.oracle.bedrock.OptionsByType optionsByType)Create aDockerImage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.oracle.bedrock.runtime.ApplicationgetApplication()DockergetDockerEnvironment()Obtain theDockerenvironment used to build thisDockerImage.StringgetFirstTag()Obtain the first of the tags used to identify this image.com.oracle.bedrock.OptionsByTypegetOptions()Obtain theOptionsByTypeused to build this image.List<String>getTags()Obtain the tags to identify this image.javax.json.JsonValueinspect()Obtain information about thisDockerImageas aJsonArray.voidonAddingTo(com.oracle.bedrock.extensible.Extensible extensible)voidonClosed(com.oracle.bedrock.runtime.Application application, com.oracle.bedrock.OptionsByType optionsByType)voidonClosing(com.oracle.bedrock.runtime.Application application, com.oracle.bedrock.OptionsByType optionsByType)voidonLaunched(com.oracle.bedrock.runtime.Application application)voidonRemovingFrom(com.oracle.bedrock.extensible.Extensible extensible)booleanremove()Remove thisDockerImage.
-
-
-
Constructor Detail
-
DockerImage
public DockerImage(List<String> tags, com.oracle.bedrock.OptionsByType optionsByType)
Create aDockerImage.- Parameters:
tags- the tags to identify this imageoptionsByType- theOptionsByTypeused to build this image
-
-
Method Detail
-
getApplication
public com.oracle.bedrock.runtime.Application getApplication()
-
getOptions
public com.oracle.bedrock.OptionsByType getOptions()
Obtain theOptionsByTypeused to build this image.- Returns:
- the
OptionsByTypeused 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
-
getDockerEnvironment
public Docker getDockerEnvironment()
Obtain theDockerenvironment used to build thisDockerImage.- Returns:
- the
Dockerenvironment used to build thisDockerImage
-
inspect
public javax.json.JsonValue inspect()
Obtain information about thisDockerImageas aJsonArray.The
JsonArraywill have a single entry that is the JSON representation of thisDockerImage's state.This equates to running the
docker inspectcommand for thisDockerImage.- Returns:
- information about this
DockerImageas aJsonArray
-
remove
public boolean remove()
Remove thisDockerImage.This equates to running the
docker rmicommand for thisDockerImage.- Returns:
trueif the remove was successful,falseotherwise
-
onAddingTo
public void onAddingTo(com.oracle.bedrock.extensible.Extensible extensible)
- Specified by:
onAddingToin interfacecom.oracle.bedrock.extensible.Feature
-
onRemovingFrom
public void onRemovingFrom(com.oracle.bedrock.extensible.Extensible extensible)
- Specified by:
onRemovingFromin interfacecom.oracle.bedrock.extensible.Feature
-
onLaunched
public void onLaunched(com.oracle.bedrock.runtime.Application application)
- Specified by:
onLaunchedin interfacecom.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:
onClosingin interfacecom.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:
onClosedin interfacecom.oracle.bedrock.runtime.ApplicationListener<com.oracle.bedrock.runtime.Application>
-
-