Package org.sonar.iac.docker.tree.impl
Class DockerImageImpl
- java.lang.Object
-
- org.sonar.iac.docker.tree.impl.AbstractDockerTreeImpl
-
- org.sonar.iac.docker.tree.impl.DockerImageImpl
-
- All Implemented Interfaces:
HasTextRange,Tree,DockerImage,DockerTree,HasScope
public class DockerImageImpl extends AbstractDockerTreeImpl implements DockerImage
Represent a Docker image and it's related instructions. A docker image is constituted first of a FROM instruction. Every following instructions until the next FROM instruction are associated to this image. A Dockerfile can contain zero (empty file) to any amount of images. Example of a Dockerfile with two DockerImage defined in it (one instruction for each) : FROM ubuntu:latest MAINTAINER bob FROM ubuntu:14.04 EXPOSE 80/tcp
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sonar.iac.docker.tree.api.DockerTree
DockerTree.Kind
-
-
Field Summary
-
Fields inherited from class org.sonar.iac.docker.tree.impl.AbstractDockerTreeImpl
parent, textRange
-
-
Constructor Summary
Constructors Constructor Description DockerImageImpl(FromInstruction from, List<Instruction> instructions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Tree>children()FromInstructionfrom()DockerTree.KindgetKind()List<Instruction>instructions()Scopescope()voidsetScope(Scope scope)-
Methods inherited from class org.sonar.iac.docker.tree.impl.AbstractDockerTreeImpl
is, parent, setParent, textRange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sonar.iac.docker.tree.api.DockerTree
is, parent, setParent
-
Methods inherited from interface org.sonar.iac.common.api.tree.HasTextRange
textRange
-
-
-
-
Constructor Detail
-
DockerImageImpl
public DockerImageImpl(FromInstruction from, List<Instruction> instructions)
-
-
Method Detail
-
from
public FromInstruction from()
- Specified by:
fromin interfaceDockerImage
-
instructions
public List<Instruction> instructions()
- Specified by:
instructionsin interfaceDockerImage
-
getKind
public DockerTree.Kind getKind()
- Specified by:
getKindin interfaceDockerTree
-
-