trait DockerfileCommands extends AnyRef
- Alphabetic
- By Inheritance
- DockerfileCommands
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract type T <: DockerfileCommands
Abstract Value Members
- abstract def addInstruction(instruction: Instruction): T
- abstract def addInstructions(instructions: TraversableOnce[Instruction]): T
-
abstract
def
self: T
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(source: File, destination: File, chown: String): T
- def add(sources: Seq[File], destination: String, chown: String): T
- def add(source: File, destination: String, chown: String): T
- def add(source: File, destination: File): T
- def add(sources: Seq[File], destination: String): T
- def add(source: File, destination: String): T
- def addRaw(source: String, destination: String): T
- def arg(key: String, defaultValue: Option[String] = None): T
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def cmd(args: String*): T
- def cmdRaw(command: String): T
- def cmdShell(args: String*): T
- def copy(source: File, destination: File, chown: String): T
- def copy(sources: Seq[File], destination: String, chown: String): T
- def copy(source: File, destination: String, chown: String): T
- def copy(source: File, destination: File): T
- def copy(sources: Seq[File], destination: String): T
- def copy(source: File, destination: String): T
- def copyRaw(source: String, destination: File): T
- def copyRaw(source: String, destination: String): T
-
def
customInstruction(instructionName: String, arguments: String): T
Adds a custom Dockerfile instruction that is not currently supported by this DSL.
Adds a custom Dockerfile instruction that is not currently supported by this DSL.
// Copy in a multi-stage Dockerfile // Equivalent to: "COPY --from=stage1 /path/to/file /path/to/file" customInstruction("COPY", "--from=stage1 /path/to/file /path/to/file") // Onbuild instruction can be represented as: // ONBUILD RUN /usr/local/bin/python-build --dir /app/src customInstruction("ONBUILD", "RUN /usr/local/bin/python-build --dir /app/src")
Example: - def entryPoint(args: String*): T
- def entryPointRaw(command: String): T
- def entryPointShell(args: String*): T
- def env(variables: Map[String, String]): T
- def env(variables: (String, String)*): T
- def env(key: String, value: String): T
- def envRaw(variables: String): T
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def expose(ports: Int*): T
- def from(image: ImageName): T
- def from(image: String): T
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def healthCheck(commands: String*): T
- def healthCheck(commands: Seq[String], interval: Option[FiniteDuration] = None, timeout: Option[FiniteDuration] = None, startPeriod: Option[FiniteDuration] = None, retries: Option[Int] = None): T
- def healthCheckNone(): T
- def healthCheckShell(commands: String*): T
- def healthCheckShell(commands: Seq[String], interval: Option[FiniteDuration] = None, timeout: Option[FiniteDuration] = None, startPeriod: Option[FiniteDuration] = None, retries: Option[Int] = None): T
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def label(lables: Map[String, String]): T
- def label(lables: (String, String)*): T
- def label(labelName: String, labelValue: String): T
- def labelRaw(labels: String): T
- def maintainer(name: String, email: String): T
- def maintainer(name: String): T
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def onBuild(instruction: DockerfileInstruction): T
-
def
run(args: String*): T
Execute a command in the image.
Execute a command in the image. Uses exec form. Which means the command will not be executed in a shell.
Example:
run("executable", "parameter1", "parameter 2")
this will yield the raw instruction
RUN ["executable", "parameter1", "parameter 2"].- args
An executable followed by eventual parameters.
-
def
runRaw(command: String): T
Execute a command in the image.
Execute a command in the image.
Example:
runRaw("executable parameter1 parameter 2")this will yield the raw instruction
RUN executable parameter1 parameter 2.- command
A command including parameters (on shell or exec form).
-
def
runShell(args: String*): T
Execute a command in the image.
Execute a command in the image. The command will be executed through a shell (
/bin/sh).Example:
runShell("executable", "parameter1", "parameter 2")
this will yield the raw instruction
RUN executable parameter1 parameter\ 2.- args
A command followed by eventual parameters.
-
def
stageFile(source: SourceFile, target: String): T
Stages a single source.
Stages a single source.
- source
What to stage.
- target
Destination path in the staging directory.
-
def
stageFile(source: File, target: String): T
Stage a file.
Stage a file. The file will be copied to the stage directory when the Dockerfile is built.
If the
targetends with / then the source filename will be added at the end.The
targetfile must be unique for this Dockerfile. Otherwise later staged files will overwrite previous files on the same target.- source
File to copy into stage dir.
- target
Path to copy file to, should be relative to the stage dir.
-
def
stageFile(source: File, target: File): T
Stage a file.
Stage a file. The file will be copied to the stage directory when the Dockerfile is built.
The
targetfile must be unique for this Dockerfile. Otherwise later staged files will overwrite previous files on the same target.- source
File to copy into stage dir.
- target
Path to copy file to, should be relative to the stage dir.
-
def
stageFiles(sources: Seq[File], target: String): T
Stages a multiple files.
Stages a multiple files.
- sources
What to stage.
- target
Destination directory in the staging directory.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def user(username: String): T
- def volume(mountPoints: String*): T
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def workDir(path: String): T
Deprecated Value Members
-
def
add(source: String, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use addRaw instead.
-
def
add(source: String, destination: String): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use addRaw instead.
-
def
add(source: sbt.URL, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use addRaw instead.
-
def
add(source: sbt.URL, destination: String): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use addRaw instead.
-
def
addRaw(source: String, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.5.0) Use addRaw(String, String) instead.
-
def
addRaw(source: sbt.URL, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.5.0) Use addRaw(String, String) instead.
-
def
addRaw(source: sbt.URL, destination: String): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.5.0) Use addRaw(String, String) instead.
-
def
copy(source: String, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use copyRaw instead.
-
def
copy(source: String, destination: String): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use copyRaw instead.
-
def
copy(source: sbt.URL, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use copyRaw instead.
-
def
copy(source: sbt.URL, destination: String): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use copyRaw instead.
-
def
copyRaw(source: sbt.URL, destination: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.1) Invalid instruction, use addRaw instead
-
def
copyRaw(source: sbt.URL, destination: String): T
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.1) Invalid instruction, use addRaw instead
-
def
copyToStageDir(source: File, targetRelativeToStageDir: File): T
- Annotations
- @deprecated
- Deprecated
(Since version 0.4.0) Use stageFile instead.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated