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
-----
Install testing deps and run the helpful script::
$ pip install -e .
$ pip install -e ".[tests]"
$ ./test.sh
$ ./docker_tests.sh
Or use tox::
$ pip install tox
$ tox
Raw data
{
"_id": null,
"home_page": "https://github.com/delfick/harpoon",
"name": "docker-harpoon",
"maintainer": "",
"docs_url": null,
"requires_python": ">= 3.6",
"maintainer_email": "",
"keywords": "docker",
"author": "Stephen Moore",
"author_email": "delfick755@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fa/54/1784814677aa4ededfb1cd7298e443ef1d5e03a7863bd6ddbb85c5db00db/docker-harpoon-0.17.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\nInstall testing deps and run the helpful script::\n\n $ pip install -e .\n $ pip install -e \".[tests]\"\n $ ./test.sh\n $ ./docker_tests.sh\n\nOr use tox::\n\n $ pip install tox\n $ tox\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Opinionated wrapper around docker",
"version": "0.17.0",
"project_urls": {
"Homepage": "https://github.com/delfick/harpoon"
},
"split_keywords": [
"docker"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fa541784814677aa4ededfb1cd7298e443ef1d5e03a7863bd6ddbb85c5db00db",
"md5": "9666645a5bbac95c75ea493efc7b8eb2",
"sha256": "a3049f5adeec055bf4cc9a7f4ff3238050ad8acae30267703a5b6ad801ea43a2"
},
"downloads": -1,
"filename": "docker-harpoon-0.17.0.tar.gz",
"has_sig": false,
"md5_digest": "9666645a5bbac95c75ea493efc7b8eb2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">= 3.6",
"size": 65952,
"upload_time": "2023-07-26T04:58:44",
"upload_time_iso_8601": "2023-07-26T04:58:44.058322Z",
"url": "https://files.pythonhosted.org/packages/fa/54/1784814677aa4ededfb1cd7298e443ef1d5e03a7863bd6ddbb85c5db00db/docker-harpoon-0.17.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-26 04:58:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "delfick",
"github_project": "harpoon",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "docker-harpoon"
}