com.typesafe.sbt.packager.docker

Members list

Type members

Classlikes

case class Cmd(cmd: String, args: String*) extends CmdLike

An arbitrary command

An arbitrary command

Attributes

Example
 val add = Cmd("ADD", "src/resource/LICENSE.txt", "/opt/docker/LICENSE.txt")
 val copy = Cmd("COPY", "src/resource/LICENSE.txt", "/opt/docker/LICENSE.txt")
 val env = Cmd("ENV", "APP_SECRET", "7sdfy7s9hfisdufuusud")
Supertypes
trait Serializable
trait Product
trait Equals
trait CmdLike
class Object
trait Matchable
class Any
Show all
trait CmdLike

a single line in a dockerfile. See subclasses for more detail

a single line in a dockerfile. See subclasses for more detail

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Cmd
class CombinedCmd
class Comment
class ExecCmd
case class CombinedCmd(cmd: String, arg: CmdLike) extends CmdLike

A command that consists of a CMD string and an CmdLike object

A command that consists of a CMD string and an CmdLike object

Attributes

Example
 val onBuildAdd = CombinedCmd("ONBUILD", Cmd("ADD", "src/resource/LICENSE.txt", "/opt/docker/LICENSE.txt"))
 val onBuildEnv = CombinedCmd("ONBUILD", Cmd("ENV", "APP_SECRET", "7sdfy7s9hfisdufuusud"))
Supertypes
trait Serializable
trait Product
trait Equals
trait CmdLike
class Object
trait Matchable
class Any
Show all
case class Comment(comment: String) extends CmdLike

A comment

A comment

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CmdLike
class Object
trait Matchable
class Any
Show all
case class DockerAlias(registryHost: Option[String], username: Option[String], name: String, tag: Option[String])

This class represents a Docker alias. It generates a string in the form of

This class represents a Docker alias. It generates a string in the form of

[REGISTRY_HOST/][USERNAME/]NAME[:TAG]

, e.g. ''my-registry.com:1234/my-user/my-service:1.0.0'' or just ''my-service:1.0.0''.

Value parameters

name

Name of the image, e.g. the artifact name

registryHost

Optional hostname of the registry (including port if applicable)

tag

Optional tag for the image, e.g. the version

username

Optional username or other qualifier

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class DockerApiVersion(major: Int, minor: Int)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait DockerChmodType

This represents a type of file permission changes to run on the working directory. Note that group file mode bits must be effective to be OpenShift compatible.

This represents a type of file permission changes to run on the working directory. Note that group file mode bits must be effective to be OpenShift compatible.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

This represents a strategy to change the file permissions.

This represents a strategy to change the file permissions.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object CopyChown
object MultiStage
object None
object Run

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object DockerPlugin extends AutoPlugin

==Docker Plugin==

==Docker Plugin==

This plugin helps you build docker containers.

==Configuration==

In order to configure this plugin take a look at the available com.typesafe.sbt.packager.docker.DockerKeys

==Requirements==

You need docker to have docker installed on your system and be able to execute commands. Check with a single command:

docker version

Future versions of the Docker Plugin may use the REST API, so you don't need docker installed locally.

Attributes

Note

this plugin is not intended to build very customizable docker images, but turn your mappings configuration in a docker image with almost no ''any'' configuration.

Example

Enable the plugin in the build.sbt

  enablePlugins(DockerPlugin)
Supertypes
class AutoPlugin
trait PluginsFunctions
class Basic
trait Plugins
class Object
trait Matchable
class Any
Show all
Self type
object DockerSpotifyClientPlugin extends AutoPlugin

==DockerSpotifyClientPlugin Plugin==

==DockerSpotifyClientPlugin Plugin==

This plugin helps you build docker containers using Spotify Docker Client.

==Configuration==

In order to configure this plugin take a look at the available com.typesafe.sbt.packager.docker.DockerKeys

==Requirements==

You need docker to have docker installed on your system. Check with a single command:

docker version

Attributes

Note

this plugin is not intended to build very customizable docker images, but turn your mappings configuration in a docker image with almost no ''any'' configuration.

Example

Enable the plugin in the build.sbt

 enablePlugins(DockerSpotifyClientPlugin)

and add the dependency in your plugins.sbt

 libraryDependencies += "com.spotify" % "docker-client" % "3.5.13"

The Docker-spotify client is a provided dependency so you have to add it on your own. It brings a lot of dependenciesthat could slow your build times. This is the reason the dependency is marked as provided.

Supertypes
class AutoPlugin
trait PluginsFunctions
class Basic
trait Plugins
class Object
trait Matchable
class Any
Show all
Self type
case object DockerStageBreak extends CmdLike

A break in Dockerfile to express multi-stage build. https://docs.docker.com/develop/develop-images/multistage-build/

A break in Dockerfile to express multi-stage build. https://docs.docker.com/develop/develop-images/multistage-build/

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CmdLike
class Object
trait Matchable
class Any
Show all
Self type
object DockerSupport

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class DockerVersion(major: Int, minor: Int, patch: Int, release: Option[String])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DockerVersion

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Dockerfile(commands: CmdLike*)

Represents dockerfile used by docker when constructing packages.

Represents dockerfile used by docker when constructing packages.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ExecCmd(cmd: String, args: String*) extends CmdLike

Executable command

Executable command

Attributes

Example
ExecCmd("RUN", "chown", "-R", daemonUser, ".")
ExecCmd("ENTRYPOINT", "bin/%s" format execScript),
ExecCmd("CMD")
ExecCmd("VOLUME", exposedVolumes: _*)
Supertypes
trait Serializable
trait Product
trait Equals
trait CmdLike
class Object
trait Matchable
class Any
Show all
case class LayeredMapping(layerId: Option[Int], file: FileRef, path: String)

Mapping of file to intermediate layers.

Mapping of file to intermediate layers.

Value parameters

file

The file produced by universal/stage to be moved into Docker / stage directory.

layerId

The identifier in the layer used to increase cache hits in docker caching. LayerId is present in Docker/stage directory structure and in intermediate image produced in the multi-stage docker build. None means the layering is skipped for this file.

path

The path in the final image

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Deprecated classlikes

trait DockerKeys

Docker settings

Docker settings

Attributes

Deprecated
true
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Keys