Docker Plugin Reference

    The XL Deploy Docker plugin allows you to create containers and connect networks and volumes to them. The plugin uses the docker-py Jython library to communicate with the Docker daemon.

    Requirements

    • XL Deploy 5.5.0
    • Docker v1.10 or later (Unix, OS X, or Microsoft Windows)
    • The Docker Remote API must be installed and enabled on the Docker host

    Using the deployables and deployeds

    Deployable Container Generated deployed
    docker.ContainerSpec docker.Engine docker.Container
    docker.NetworkSpec docker.Engine docker.Network
    docker.VolumeSpec docker.Engine docker.Volume

    Limitations

    • Docker Compose is not supported.
    • Docker Swarm and services are not supported.

    Release notes

    Docker plugin 5.5.0

    Initial release.

    CI Reference

    Configuration Item Overview

    Deployables

    CI Description
    docker.ContainerSpec Specification for a Docker container
    docker.NetworkSpec Specification for a Docker network
    docker.VolumeSpec Specification for a Docker volume

    Deployeds

    CI Description
    docker.Container A docker container
    docker.Network A Docker network
    docker.Volume A Docker volume

    Containers

    CI Description
    docker.Engine A Docker engine

    Other Configuration Items

    CI Description
    docker.Container A docker container
    docker.ContainerSpec Specification for a Docker container
    docker.Engine A Docker engine
    docker.Network A Docker network
    docker.NetworkSpec Specification for a Docker network
    docker.Port Port binding
    docker.PortSpec Specification for a Docker port binding
    docker.Volume A Docker volume
    docker.VolumeSpec Specification for a Docker volume

    Configuration Item Details

    docker.Container

    Type Hierarchy udm.BaseDeployed >> udm.BaseConfigurationItem
    Interfaces udm.EmbeddedDeployedContainer, udm.Deployed, udm.ConfigurationItem

    A docker container.

    Parent
     
     
    container : CI<udm.Container>
    The container on which this deployed runs.
    Children
     
     
    portBindings : LIST_OF_CI<docker.Port >
    A list of port bindings.
    Public Properties
     
     
    image : STRING
    Docker image and version to retrieve from Docker Hub. For example: ubuntu:14.04
     
     
    commands : LIST_OF_STRING
    List of commands to run in the container.
     
     
    containerName : STRING
    The container name; if not specified, the CI name will be used. The Docker container name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-]
     
     
    deployable : CI<udm.Deployable>
    The deployable that this deployed is derived from.
     
     
    links : MAP_STRING_STRING
    A map of deployable name and alias in case deployable is present in same application package, otherwise provide container name and alias. Alias name should be unique for each pair.
     
     
    networks : LIST_OF_STRING
    List of Docker network names to which this container can connect.
     
     
    publishAllPorts : BOOLEAN
    Publish all exposed ports to random ports.
     
     
    volumes : LIST_OF_STRING
    List of Docker volume names to which this container should connect.

    docker.ContainerSpec

    Type Hierarchy udm.BaseDeployable >> udm.BaseConfigurationItem
    Interfaces udm.ConfigurationItem, udm.Taggable, udm.Deployable

    Specification for a Docker container. The name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-]

    Children
     
     
    portBindings : LIST_OF_CI<docker.PortSpec >
    The list of port bindings.
    Public Properties
     
     
    commands : LIST_OF_STRING
    List of commands to run in the container. (list_of_string)
     
     
    containerName : STRING
    The container name; if not specified, the CI name will be used. The Docker container name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-] (string)
     
     
    image : STRING
    Docker image and version to retrieve from Docker Hub. For example: ubuntu:14.04 (string)
     
     
    links : MAP_STRING_STRING
    A map of deployable name and alias in case deployable is present in same application package, otherwise provide container name and alias. Alias name should be unique for each pair. (map_string_string)
     
     
    networks : LIST_OF_STRING
    List of Docker network names to which this container can connect. (list_of_string)
     
     
    publishAllPorts : STRING
    Publish all exposed ports to random ports. (boolean)
     
     
    tags : SET_OF_STRING
    If set, this deployable will only be mapped automatically to containers with the same tag.
     
     
    volumes : LIST_OF_STRING
    List of Docker volume names to which this container should connect. (list_of_string)

    docker.Engine

    Type Hierarchy udm.BaseContainer >> udm.BaseConfigurationItem
    Interfaces udm.Container, udm.ConfigurationItem, udm.Taggable

    A Docker engine.

    Public Properties
     
     
    dockerHost : STRING
    The protocol, host name, and port where the Docker server is hosted. For example: https://docker-host:2376
     
     
    caPem : STRING
    Content of the Certification Authority certificate file (ca.pem).
     
     
    certPem : STRING
    Content of the signed public key file (cert.pem).
     
     
    enableTLS : BOOLEAN  = false
    Enable this option to connect to the Docker host in a safe manner. You must provide certificate details on the Certificate tab.
     
     
    keyPem : STRING
    Content of the client key file (key.pem).
     
     
    tags : SET_OF_STRING
    If set, only deployables with the same tag will be automatically mapped to this container.

    docker.Network

    Type Hierarchy udm.BaseDeployed >> udm.BaseConfigurationItem
    Interfaces udm.EmbeddedDeployedContainer, udm.Deployed, udm.ConfigurationItem

    A Docker network.

    Parent
     
     
    container : CI<udm.Container>
    The container on which this deployed runs.
    Public Properties
     
     
    deployable : CI<udm.Deployable>
    The deployable that this deployed is derived from.
     
     
    driver : STRING  = bridge
    Name of the driver used to create the network.
     
     
    networkName : STRING
    The network name; if not specified, the CI name will be used. The Docker network name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-]
     
     
    networkOptions : MAP_STRING_STRING
    Driver options as a key-value pair.

    docker.NetworkSpec

    Type Hierarchy udm.BaseDeployable >> udm.BaseConfigurationItem
    Interfaces udm.ConfigurationItem, udm.Taggable, udm.Deployable

    Specification for a Docker network. The name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-]

    Public Properties
     
     
    driver : STRING
    Name of the driver used to create the network. (string) default(bridge)
     
     
    networkName : STRING
    The network name; if not specified, the CI name will be used. The Docker network name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-] (string)
     
     
    networkOptions : MAP_STRING_STRING
    Driver options as a key-value pair. (map_string_string)
     
     
    tags : SET_OF_STRING
    If set, this deployable will only be mapped automatically to containers with the same tag.

    docker.Port

    Type Hierarchy udm.BaseEmbeddedDeployed >> udm.BaseConfigurationItem
    Interfaces udm.EmbeddedDeployedContainer, udm.EmbeddedDeployed, udm.ConfigurationItem

    Port binding.

    Parent
     
     
    container : CI<udm.EmbeddedDeployedContainer>
    The (embedded) deployed which contains this embedded deployed.
    Public Properties
     
     
    containerPort : INTEGER
    Port number of Docker container.
     
     
    hostPort : INTEGER
    Port number of Docker host.
     
     
    deployable : CI<udm.EmbeddedDeployable>
    The embedded deployable that this embedded deployed is derived from.
     
     
    protocol : STRING  = tcp
    Protocol used by the specified port binding. For example: udp or tcp

    docker.PortSpec

    Type Hierarchy udm.BaseEmbeddedDeployable >> udm.BaseConfigurationItem
    Interfaces udm.EmbeddedDeployable, udm.ConfigurationItem

    Specification for a Docker port binding.

    Public Properties
     
     
    containerPort : STRING
    Port number of Docker container. (integer)
     
     
    hostPort : STRING
    Port number of Docker host. (integer)
     
     
    protocol : STRING
    Protocol used by the specified port binding. For example: udp or tcp (string) default(tcp)

    docker.Volume

    Type Hierarchy udm.BaseDeployed >> udm.BaseConfigurationItem
    Interfaces udm.EmbeddedDeployedContainer, udm.Deployed, udm.ConfigurationItem

    A Docker volume.

    Parent
     
     
    container : CI<udm.Container>
    The container on which this deployed runs.
    Public Properties
     
     
    deployable : CI<udm.Deployable>
    The deployable that this deployed is derived from.
     
     
    driver : STRING  = bridge
    Name of the driver used to create the volume.
     
     
    driverOptions : MAP_STRING_STRING
    Driver options as a key-value pair.
     
     
    volumeName : STRING
    The volume name; if not specified, the CI name will be used. The Docker volume name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-].

    docker.VolumeSpec

    Type Hierarchy udm.BaseDeployable >> udm.BaseConfigurationItem
    Interfaces udm.ConfigurationItem, udm.Taggable, udm.Deployable

    Specification for a Docker volume. The name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-]

    Public Properties
     
     
    driver : STRING
    Name of the driver used to create the volume. (string) default(bridge)
     
     
    driverOptions : MAP_STRING_STRING
    Driver options as a key-value pair. (map_string_string)
     
     
    tags : SET_OF_STRING
    If set, this deployable will only be mapped automatically to containers with the same tag.
     
     
    volumeName : STRING
    The volume name; if not specified, the CI name will be used. The Docker volume name must match the regular expression [a-zA-Z0-9][a-zA-Z0-9_.-]. (string)