Module docker

Module to manage docker based containers

Typedefs

typedef docker::container_state
  • Base type string

  • Type constraint ((((self == 'running') or (self == 'stopped')) or (self == 'latest')) or (self == 'purged'))

Entities

entity docker::Container

Parents: std::Entity

A docker container deployed on a container service

attribute string name

The name of the docker container

attribute string image

The image to base this container on

attribute bool detach=true

Detach this container when started?

attribute docker::container_state state='running'

The state of the container

attribute string memory_limit='0'

RAM allocated to the container in human readable format (“128MB”)

attribute string command=''

The command to execute

attribute string entrypoint=''

The entrypoint of the container

relation docker::Service service [1]

other end: docker::Service.containers [0:*]

relation docker::Port ports [0:*]

other end: docker::Port.container [1]

relation docker::Volume volumes [0:*]

other end: docker::Volume.container [1]

The following implements statements select implementations for this entity:

entity docker::Port

Parents: std::Entity

A portmapping between the container and the host

attribute ip::ip host_ip='0.0.0.0'
attribute ip::port host_port
attribute ip::port container_port
relation docker::Container container [1]

other end: docker::Container.ports [0:*]

entity docker::Registry

Parents: ip::services::Server

Deploy a docker registry

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity docker::Service

Parents: ip::services::Server

A docker service

attribute ip::cidr bridge_ip='172.17.0.1/16'
relation docker::Container containers [0:*]

other end: docker::Container.service [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity docker::Volume

Parents: std::Entity

A volume mounted from the host into the container

attribute string host_path
attribute string container_path
attribute string options='rw'
relation docker::Container container [1]

other end: docker::Container.volumes [0:*]

Implementations

implementation docker::docker
implementation docker::dockerRegistry

Resources

class docker.Container

This class represents a docker container

Handlers

class docker.ContainerHandler