docker-0.5.1.1: An API client for docker written in Haskell

Safe HaskellNone
LanguageHaskell2010

Docker.Client.Types

Synopsis

Documentation

type URL = Text #

We should newtype this

type ApiVersion = Text #

We should newtype this

fromContainerID :: ContainerID -> Text #

Used for extracting the id of the container from the newtype

toContainerID :: Text -> Maybe ContainerID #

Used for parsing a Text value into a ContainerID. We apply some basic validation here.

fromImageID :: ImageID -> Text #

Used for extracting the id of the image from the newtype.

toImageID :: Text -> Maybe ImageID #

Helper function used for parsing a Text value into an ImageID. For now just basic validation is used.

data Timeout #

Timeout used for stopping a container. DefaultTimeout is 10 seconds.

Instances

data Signal #

Signal used for sending to the process running in the container. The default signal is SIGTERM.

data ContainerDetails #

Instances

Eq ContainerDetails # 
Show ContainerDetails # 
Generic ContainerDetails # 
FromJSON ContainerDetails # 
type Rep ContainerDetails # 
type Rep ContainerDetails = D1 * (MetaData "ContainerDetails" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) (C1 * (MetaCons "ContainerDetails" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "appArmorProfile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "args") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text]))) ((:*:) * (S1 * (MetaSel (Just Symbol "containerDetailsConfig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ContainerConfig)) ((:*:) * (S1 * (MetaSel (Just Symbol "created") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * UTCTime)) (S1 * (MetaSel (Just Symbol "driver") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "containerDetailsHostConfig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * HostConfig)) (S1 * (MetaSel (Just Symbol "hostnamePath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath))) ((:*:) * (S1 * (MetaSel (Just Symbol "hostsPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath)) ((:*:) * (S1 * (MetaSel (Just Symbol "logPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath)) (S1 * (MetaSel (Just Symbol "containerDetailsId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ContainerID)))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "containerDetailsImage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ImageID)) (S1 * (MetaSel (Just Symbol "mountLabel") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "name") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "networkSettings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * NetworkSettings)) (S1 * (MetaSel (Just Symbol "path") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "processLabel") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "resolveConfPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath))) ((:*:) * (S1 * (MetaSel (Just Symbol "restartCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)) ((:*:) * (S1 * (MetaSel (Just Symbol "containerDetailsState") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ContainerState)) (S1 * (MetaSel (Just Symbol "mounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Mount]))))))))

defaultClientOpts :: DockerClientOpts #

Default DockerClientOpts used for talking to the docker engine.

data ListOpts #

List options used for filtering the list of container or images.

Constructors

ListOpts 

Fields

defaultListOpts :: ListOpts #

Default ListOpts. Doesn't list stopped containers.

data DockerVersion #

Data type used for represneting the version of the docker engine remote API.

Instances

Eq DockerVersion # 
Show DockerVersion # 
Generic DockerVersion # 

Associated Types

type Rep DockerVersion :: * -> * #

ToJSON DockerVersion # 
FromJSON DockerVersion # 
type Rep DockerVersion # 

data ContainerState #

Data type used for parsing the container state from a list of containers.

Instances

Eq ContainerState # 
Show ContainerState # 
Generic ContainerState # 

Associated Types

type Rep ContainerState :: * -> * #

FromJSON ContainerState # 
type Rep ContainerState # 

data State #

Represents the state of the container life cycle.

Instances

Eq State # 

Methods

(==) :: State -> State -> Bool #

(/=) :: State -> State -> Bool #

Show State # 

Methods

showsPrec :: Int -> State -> ShowS #

show :: State -> String #

showList :: [State] -> ShowS #

Generic State # 

Associated Types

type Rep State :: * -> * #

Methods

from :: State -> Rep State x #

to :: Rep State x -> State #

FromJSON State # 
type Rep State # 
type Rep State = D1 * (MetaData "State" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) ((:+:) * ((:+:) * (C1 * (MetaCons "Created" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Restarting" PrefixI False) (U1 *)) (C1 * (MetaCons "Running" PrefixI False) (U1 *)))) ((:+:) * (C1 * (MetaCons "Paused" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Exited" PrefixI False) (U1 *)) (C1 * (MetaCons "Dead" PrefixI False) (U1 *)))))

type Digest = Text #

Alias for representing a RepoDigest. We could newtype this and add some validation.

data Label #

Container and Image Labels.

Constructors

Label Name Value 

Instances

type Tag = Text #

Alias for Tags.

data Image #

Data type used for parsing information from a list of images.

Instances

Eq Image # 

Methods

(==) :: Image -> Image -> Bool #

(/=) :: Image -> Image -> Bool #

Show Image # 

Methods

showsPrec :: Int -> Image -> ShowS #

show :: Image -> String #

showList :: [Image] -> ShowS #

Generic Image # 

Associated Types

type Rep Image :: * -> * #

Methods

from :: Image -> Rep Image x #

to :: Rep Image x -> Image #

FromJSON Image # 
type Rep Image # 

dropImagePrefix :: [a] -> [a] #

Helper function used for dropping the "image" prefix when serializing the Image data type to and from json.

data BuildOpts #

Options for when building images from a Dockerfile

Constructors

BuildOpts 

Fields

defaultCreateOpts :: Text -> CreateOpts #

Default create options when creating a container. You only need to specify an image name and the rest is all sensible defaults.

data DetachKeys #

Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-value where value is one of: a-z, @, ^, [, , or _.

data StartOpts #

Options for starting a container.

Constructors

StartOpts 

defaultStartOpts :: StartOpts #

Default options for staring a container.

data DeleteOpts #

Options for deleting a container.

Constructors

DeleteOpts 

Fields

  • deleteVolumes :: Bool

    Automatically cleanup volumes that the container created as well.

  • force :: Bool

    If the container is still running force deletion anyway.

defaultDeleteOpts :: DeleteOpts #

Default options for deleting a container. Most of the time we DON'T want to delete the container's volumes or force delete it if it's running.

type Timestamp = Integer #

Timestamp alias.

data TailLogOpt #

Used for requesting N number of lines when tailing a containers log output.

Constructors

Tail Integer 
All 

data LogOpts #

Log options used when requesting the log output from a container.

Constructors

LogOpts 

Instances

defaultLogOpts :: LogOpts #

Sensible default for log options.

newtype Volume #

Used for marking a directory in the container as "exposed" hence taking it outside of the COW filesystem and making it mountable in other containers using VolumesFrom. The volume usually get's created somewhere in varlibdockervolumes (depending on the volume driver used). The CLI example is:

docker run --name app -v /opt/data -it myapp:latest
docker run --name app2 --volumes-from app /bin/bash -c "ls -l /opt/data"

Constructors

Volume FilePath 

data Device #

Instances

Eq Device # 

Methods

(==) :: Device -> Device -> Bool #

(/=) :: Device -> Device -> Bool #

Show Device # 
Generic Device # 

Associated Types

type Rep Device :: * -> * #

Methods

from :: Device -> Rep Device x #

to :: Rep Device x -> Device #

ToJSON Device # 
FromJSON Device # 
type Rep Device # 
type Rep Device = D1 * (MetaData "Device" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) (C1 * (MetaCons "Device" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "pathOnHost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath)) ((:*:) * (S1 * (MetaSel (Just Symbol "pathInContainer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath)) (S1 * (MetaSel (Just Symbol "cgroupPermissions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)))))

data Link #

Constructors

Link Text (Maybe Text) 

data Mount #

Data type used for parsing the mount information from a container list.

data PortBinding #

This datastructure models mapping a Port from the container onto the host system s that the service running in the container can be accessed from the outside world. We either map a port onto all interfaces (default) or onto a specific interface like `127.0.0.1`. NOTE: We should disallow duplicate port bindings as the ToJSON instance will only send the last one. { port/protocol: [{ HostPort: "port" }] }

newtype UTSMode #

Constructors

UTSMode Text 

Instances

data HostConfig #

Instances

Eq HostConfig # 
Show HostConfig # 
Generic HostConfig # 

Associated Types

type Rep HostConfig :: * -> * #

ToJSON HostConfig # 
FromJSON HostConfig # 
type Rep HostConfig # 
type Rep HostConfig = D1 * (MetaData "HostConfig" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) (C1 * (MetaCons "HostConfig" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "binds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Bind])) (S1 * (MetaSel (Just Symbol "containerIDFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe FilePath)))) ((:*:) * (S1 * (MetaSel (Just Symbol "logConfig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * LogDriverConfig)) ((:*:) * (S1 * (MetaSel (Just Symbol "networkMode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * NetworkMode)) (S1 * (MetaSel (Just Symbol "portBindings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [PortBinding]))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "restartPolicy") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * RestartPolicy)) ((:*:) * (S1 * (MetaSel (Just Symbol "volumeDriver") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "volumesFrom") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [VolumeFrom])))) ((:*:) * (S1 * (MetaSel (Just Symbol "capAdd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])) ((:*:) * (S1 * (MetaSel (Just Symbol "capDrop") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])) (S1 * (MetaSel (Just Symbol "dns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "dnsOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])) ((:*:) * (S1 * (MetaSel (Just Symbol "dnsSearch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])) (S1 * (MetaSel (Just Symbol "extraHosts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])))) ((:*:) * (S1 * (MetaSel (Just Symbol "ipcMode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "links") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Link])) (S1 * (MetaSel (Just Symbol "oomScoreAdj") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Integer)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "privileged") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) ((:*:) * (S1 * (MetaSel (Just Symbol "publishAllPorts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "readonlyRootfs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "securityOpt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text])) ((:*:) * (S1 * (MetaSel (Just Symbol "shmSize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Integer))) (S1 * (MetaSel (Just Symbol "resources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ContainerResources))))))))

defaultHostConfig :: HostConfig #

Default host confiratuon used for creating a container.

data Ulimit #

Constructors

Ulimit 

Instances

Eq Ulimit # 

Methods

(==) :: Ulimit -> Ulimit -> Bool #

(/=) :: Ulimit -> Ulimit -> Bool #

Show Ulimit # 
Generic Ulimit # 

Associated Types

type Rep Ulimit :: * -> * #

Methods

from :: Ulimit -> Rep Ulimit x #

to :: Rep Ulimit x -> Ulimit #

ToJSON Ulimit # 
FromJSON Ulimit # 
type Rep Ulimit # 
type Rep Ulimit = D1 * (MetaData "Ulimit" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) (C1 * (MetaCons "Ulimit" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "ulimitName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "ulimitSoft") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Integer)) (S1 * (MetaSel (Just Symbol "ulimitHard") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Integer)))))

data ContainerResources #

Instances

Eq ContainerResources # 
Show ContainerResources # 
Generic ContainerResources # 
FromJSON ContainerResources # 
type Rep ContainerResources # 
type Rep ContainerResources = D1 * (MetaData "ContainerResources" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) (C1 * (MetaCons "ContainerResources" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "cpuShares") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Integer))) (S1 * (MetaSel (Just Symbol "blkioWeight") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Integer)))) ((:*:) * (S1 * (MetaSel (Just Symbol "blkioWeightDevice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe [DeviceWeight]))) (S1 * (MetaSel (Just Symbol "blkioDeviceReadBps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe [DeviceRate]))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "blkioDeviceWriteBps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe [DeviceRate]))) (S1 * (MetaSel (Just Symbol "blkioDeviceReadIOps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe [DeviceRate])))) ((:*:) * (S1 * (MetaSel (Just Symbol "blkioDeviceWriteIOps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe [DeviceRate]))) (S1 * (MetaSel (Just Symbol "cpuPeriod") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Integer)))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "cpusetCpus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "cpusetMems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "devices") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Device])) (S1 * (MetaSel (Just Symbol "kernelMemory") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe MemoryConstraint))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "memory") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe MemoryConstraint))) (S1 * (MetaSel (Just Symbol "memoryReservation") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe MemoryConstraint)))) ((:*:) * (S1 * (MetaSel (Just Symbol "memorySwap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe MemoryConstraint))) ((:*:) * (S1 * (MetaSel (Just Symbol "oomKillDisable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Bool))) (S1 * (MetaSel (Just Symbol "ulimits") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Ulimit]))))))))

type Port = Integer #

type Name = Text #

type Value = Text #

data ContainerConfig #

Instances

Eq ContainerConfig # 
Show ContainerConfig # 
Generic ContainerConfig # 
ToJSON ContainerConfig # 
FromJSON ContainerConfig # 
type Rep ContainerConfig # 
type Rep ContainerConfig = D1 * (MetaData "ContainerConfig" "Docker.Client.Types" "docker-0.5.1.1-eEl7zMUAXY3QYkaNuzYeI" False) (C1 * (MetaCons "ContainerConfig" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "hostname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "domainname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "user") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "attachStdin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "attachStdout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "attachStderr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "exposedPorts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [ExposedPort]))) ((:*:) * (S1 * (MetaSel (Just Symbol "tty") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) ((:*:) * (S1 * (MetaSel (Just Symbol "openStdin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "stdinOnce") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "env") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [EnvVar])) (S1 * (MetaSel (Just Symbol "cmd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text]))) ((:*:) * (S1 * (MetaSel (Just Symbol "image") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "volumes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Volume])) (S1 * (MetaSel (Just Symbol "workingDir") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe FilePath)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "entrypoint") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Entrypoint)) (S1 * (MetaSel (Just Symbol "networkDisabled") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "macAddress") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "labels") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Label])) (S1 * (MetaSel (Just Symbol "stopSignal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Signal))))))))

defaultContainerConfig :: Text -> ContainerConfig #

Container configuration used for creating a container with sensible defaults.

data ExposedPort #

ExposedPort represents a port (and it's type) that a container should expose to other containers or the host system. NOTE: This does not automatically expose the port onto the host system but rather it just tags it. It's best to be used with the PublishAllPorts flag. It is also useful for the daemon to know which Environment variables to inject into a container linking to our container. Example linking a Postgres container named db would inject the following environment variables automatically if we set the corresponding

ExposedPort:

DB_PORT_5432_TCP_PORT="5432"
DB_PORT_5432_TCP_PROTO="tcp"
DB_PORT_5432_TCP="tcp://172.17.0.1:5432"

Constructors

ExposedPort Port PortType 

addPortBinding :: PortBinding -> CreateOpts -> CreateOpts #

A convenience function that adds PortBindings to and exiting CreateOpts record. Useful with defaultCreateOpts Example:

>>> let pb = PortBinding 80 TCP [HostPort "0.0.0.0" 8000]
>>> addPortBinding pb $ defaultCreateOpts "nginx:latest"

addExposedPort :: ExposedPort -> CreateOpts -> CreateOpts #

Helper function for adding a ExposedPort to and existing CreateOpts record.

addBind :: Bind -> CreateOpts -> CreateOpts #

A helper function to more easily add a bind mount to existing CreateOpts records.

setCmd :: Text -> CreateOpts -> CreateOpts #

Helper function for adding a Command to and existing CreateOpts record.

addLink :: Link -> CreateOpts -> CreateOpts #

Helper function for adding a Link to and existing CreateOpts record.

addVolume :: Volume -> CreateOpts -> CreateOpts #

Helper function for adding a Volume to and existing CreateOpts record.

addVolumeFrom :: VolumeFrom -> CreateOpts -> CreateOpts #

Helper function for adding a VolumeFrom to and existing CreateOpts record.