Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
pycklets / resources / frecklet / docker-container-running.frecklet
Size: Mime:
doc:
  short_help: Makes sure a specific docker image is running on this machine.
  help: |
    Installs docker (if necessary), then downloads and executes a Docker image.

    TODO: Add other important 'docker run' flags. Maybe not all of them, have a 'docker-container-running-export' (or so) frecklet for that.
    Probably also have a different frecklet for interactive docker containers that can take command-line arguments. Not sure yet.

args:
  name:
    doc:
      short_help: A name to identify this container with.
    type: string
    required: true
  skip_docker_install:
    doc:
      short_help: Whether to assume docker is already installed.
    type: boolean
    required: false
    default: false
    cli:
      param_decls:
      - --skip-docker-install
      - -s
  ports:
    doc:
      short_help: A list of ports to expose on the host.
    type: list
    schema:
      type: string
    default: []
    empty: true
    cli:
      param_decls:
      - --port
      - -p
  image:
    doc:
      short_help: The image to use.
    type: string
    required: true
  volumes:
    doc:
      short_help: A list of volumes to mount.
    type: list
    schema:
      type: string
    empty: true
    cli:
      param_decls:
      - --volume
      - -v

frecklets:
- docker-service:
    frecklet::skip: '{{:: skip_docker_install ::}}'
    users: '{{:: users ::}}'
- frecklet:
    name: docker_container
    type: ansible-module
    desc:
      short: 'executing docker image: {{:: image ::}}'
    properties:
      idempotent: true
      internet: true
      elevated: true
  task:
    become: true
    pip_dependencies:
    - docker
  vars:
    name: '{{:: name ::}}'
    image: '{{:: image ::}}'
    published_ports: '{{:: ports ::}}'
    volumes: '{{:: volumes ::}}'
meta: {}