docker-harpoon


Namedocker-harpoon JSON
Version 0.19.0 PyPI version JSON
download
home_pageNone
SummaryOpinionated wrapper around docker
upload_time2024-06-15 04:32:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords docker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Harpoon
=======

An opinionated wrapper around the docker-py API that lets you use YAML to define
images and run tasks.

.. image:: https://travis-ci.org/delfick/harpoon.png?branch=master
    :target: https://travis-ci.org/delfick/harpoon

See http://harpoon.readthedocs.io for the full documentation.

Installation
------------

Just use pip::

    $ pip install docker-harpoon

Configuration
-------------

Before Harpoon can be used, it must be configured. Configuration is obtained
from the following locations in the following order of precedence:

* Provided --harpoon-config value
* HARPOON_CONFIG environment variable
* ./harpoon.yml

Further, you can also define user-wide settings in your home directory at
``~/.harpoonrc.yml``. For example if you want the "dark" theme for the logging:

.. code-block:: yaml

    ---

    term_colors: dark

The contents of the harpoon config has only one mandatory option, ``images``.
This must be a dictionary of ``image_alias`` to ``image_options``:

.. code-block:: yaml

    ---

    images:
      cacafire:
        commands:
          - FROM ubuntu:14.04
          - RUN apt-get update && apt-get -y install caca-utils
          - CMD cacafire

A rough overview of all the options available can be found at
http://harpoon.readthedocs.org/en/latest/docs/configuration.html

Usage
-----

Once harpoon is installed, there will be a new program called ``harpoon``.

When you call harpoon without any arguments it will print out the tasks you
have available.

Unless you don't have a config file, in which case it'll complain you have no
configuration file.

Once you have a valid configuration file and have chosen a task you wish to
invoke, you may use the ``--task`` cli option to invoke that task::

    $ harpoon --task <task>

Most tasks will also require you to specify an image to work with::

    $ harpoon --task <task> --image <image_alias>

Simpler Usage
-------------

To save typing ``--task`` and ``--image`` too much, the first positional argument
is treated as ``task`` (unless it is prefixed with a dash) and the second
positional argument (if also not prefixed with a dash) is taken as the ``image``.

So::

    $ harpoon --task run --image my_amazing_image

Is equivalent to::

    $ harpoon run my_amazing_image

Changelog
---------

https://harpoon.readthedocs.io/en/latest/docs/changelog.html

Tests
-----

Run::

  > ./test.sh

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "docker-harpoon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "docker",
    "author": null,
    "author_email": "Stephen Moore <stephen@delfick.com>",
    "download_url": "https://files.pythonhosted.org/packages/03/c5/c7b83a3359d6099bda54bd8a4a2ea3c2767590ff17af985f1afbfcd21ea8/docker_harpoon-0.19.0.tar.gz",
    "platform": null,
    "description": "Harpoon\n=======\n\nAn opinionated wrapper around the docker-py API that lets you use YAML to define\nimages and run tasks.\n\n.. image:: https://travis-ci.org/delfick/harpoon.png?branch=master\n    :target: https://travis-ci.org/delfick/harpoon\n\nSee http://harpoon.readthedocs.io for the full documentation.\n\nInstallation\n------------\n\nJust use pip::\n\n    $ pip install docker-harpoon\n\nConfiguration\n-------------\n\nBefore Harpoon can be used, it must be configured. Configuration is obtained\nfrom the following locations in the following order of precedence:\n\n* Provided --harpoon-config value\n* HARPOON_CONFIG environment variable\n* ./harpoon.yml\n\nFurther, you can also define user-wide settings in your home directory at\n``~/.harpoonrc.yml``. For example if you want the \"dark\" theme for the logging:\n\n.. code-block:: yaml\n\n    ---\n\n    term_colors: dark\n\nThe contents of the harpoon config has only one mandatory option, ``images``.\nThis must be a dictionary of ``image_alias`` to ``image_options``:\n\n.. code-block:: yaml\n\n    ---\n\n    images:\n      cacafire:\n        commands:\n          - FROM ubuntu:14.04\n          - RUN apt-get update && apt-get -y install caca-utils\n          - CMD cacafire\n\nA rough overview of all the options available can be found at\nhttp://harpoon.readthedocs.org/en/latest/docs/configuration.html\n\nUsage\n-----\n\nOnce harpoon is installed, there will be a new program called ``harpoon``.\n\nWhen you call harpoon without any arguments it will print out the tasks you\nhave available.\n\nUnless you don't have a config file, in which case it'll complain you have no\nconfiguration file.\n\nOnce you have a valid configuration file and have chosen a task you wish to\ninvoke, you may use the ``--task`` cli option to invoke that task::\n\n    $ harpoon --task <task>\n\nMost tasks will also require you to specify an image to work with::\n\n    $ harpoon --task <task> --image <image_alias>\n\nSimpler Usage\n-------------\n\nTo save typing ``--task`` and ``--image`` too much, the first positional argument\nis treated as ``task`` (unless it is prefixed with a dash) and the second\npositional argument (if also not prefixed with a dash) is taken as the ``image``.\n\nSo::\n\n    $ harpoon --task run --image my_amazing_image\n\nIs equivalent to::\n\n    $ harpoon run my_amazing_image\n\nChangelog\n---------\n\nhttps://harpoon.readthedocs.io/en/latest/docs/changelog.html\n\nTests\n-----\n\nRun::\n\n  > ./test.sh\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Opinionated wrapper around docker",
    "version": "0.19.0",
    "project_urls": {
        "Homepage": "https://github.com/delfick/harpoon"
    },
    "split_keywords": [
        "docker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2d0eb5fdf86924f3da4c8f58b0a550622181a274e4ebffd82ab7c8188eb9ee7",
                "md5": "60695b98fff94d9778aeae9caecb8203",
                "sha256": "bfe15548df0fac9dd356198afdbbb255fe4c5aaeb628d957f5283edab9935476"
            },
            "downloads": -1,
            "filename": "docker_harpoon-0.19.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "60695b98fff94d9778aeae9caecb8203",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 69320,
            "upload_time": "2024-06-15T04:32:57",
            "upload_time_iso_8601": "2024-06-15T04:32:57.122826Z",
            "url": "https://files.pythonhosted.org/packages/d2/d0/eb5fdf86924f3da4c8f58b0a550622181a274e4ebffd82ab7c8188eb9ee7/docker_harpoon-0.19.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03c5c7b83a3359d6099bda54bd8a4a2ea3c2767590ff17af985f1afbfcd21ea8",
                "md5": "bfb1327c90bedf26b4c0f558fcbda093",
                "sha256": "b9e78336caa3532195de061857d33e1623ced37fbf47b699a92d559368bc7e3e"
            },
            "downloads": -1,
            "filename": "docker_harpoon-0.19.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bfb1327c90bedf26b4c0f558fcbda093",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 53674,
            "upload_time": "2024-06-15T04:32:59",
            "upload_time_iso_8601": "2024-06-15T04:32:59.918382Z",
            "url": "https://files.pythonhosted.org/packages/03/c5/c7b83a3359d6099bda54bd8a4a2ea3c2767590ff17af985f1afbfcd21ea8/docker_harpoon-0.19.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-15 04:32:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "delfick",
    "github_project": "harpoon",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "docker-harpoon"
}
        
Elapsed time: 0.28230s