Posts for: #Orchestration

Annotated documentation for DockerInc::Docker::Container

This is a companion to my article on the Docker plugin for Heat.

DockerInc::Docker::Container

Properties

  • cmd : List

    Command to run after spawning the container.

    Optional property.

    Example:

      cmd: [ 'thttpd', '-C', '/etc/thttpd.conf', '-D', '-c', '*.cgi']
    
  • dns : List

    Set custom DNS servers.

    Example:

      dns:
        - 8.8.8.8
        - 8.8.4.4
    
  • docker_endopint : String

    Docker daemon endpoint. By default the local Docker daemon will be used.

    Example:

      docker_endpoint: tcp://192.168.1.100:2375
    
  • env : String

    Set environment variables.

    Example:

      env:
        - MYSQL_ROOT_PASSWORD=secret
        - "ANOTHER_VARIABLE=something long with spaces"
    
  • hostname : String

    Hostname of the container.

    Example:

      hostname: mywebserver
    
  • image : String

    Image name to boot.

    Example:

      image: mysql
    
  • links : Mapping

    Links to other containers.

    Example:

      links:
        name_in_this_container: name_of_that_container
    
  • memory : Number

    Memory limit in bytes.

    Example:

      # 512 MB
      memory: 536870912
    
  • name : String

    Name of the container.

    Example:

      name: dbserver
    
  • open_stdin : Boolean

    True to open stdin.

    Example:

      open_stdin: true
    
  • port_bindings : Map

    TCP/UDP port bindings.

    Example:

      # bind port 8080 in the container to port 80 on the host
      port_bindings:
        8080: 80
    
  • port_specs : List

    List of TCP/UDP ports exposed by the container.

    Example:

      port_specs:
        - 80
        - 53/udp
    
  • privileged : Boolean

    Enable extended privileges.

    Example:

      privileged: true
    
  • stdin_once : Boolean

    If true, close stdin after the one attached client disconnects.

    Example:

      stdin_once: true
    
  • tty : Boolean

    Allocate a pseudo-tty if true.

    Example:

      tty: true
    
  • user : String

    Username or UID for running the container.

    Example:

      username: apache
    
  • volumes : Map

    Create a bind mount.

    Example:

      volumes:
          /var/tmp/data_on_host: /srv/data_in_container
    
  • volumes_from : String

    This option is broken in the current version of the Docker plugin.

[read more]

Docker plugin for OpenStack Heat

I have been looking at both Docker and OpenStack recently. In my last post I talked a little about the Docker driver for Nova; in this post I’ll be taking an in-depth look at the Docker plugin for Heat, which has been available since the Icehouse release but is surprisingly under-documented.

The release announcement on the Docker blog includes an example Heat template, but it is unfortunately grossly inaccurate and has led many people astray. In particular:

[read more]