Skip to main content

Harpoon

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

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

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:

---

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:

---

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

Metadata

Release files for docker-harpoon 0.19.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docker-harpoon 0.19.0
File Size Uploaded Provenance Actions
docker_harpoon-0.19.0.tar.gz 53.7 kB Without provenance Details for docker_harpoon-0.19.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docker-harpoon 0.19.0
File Interpreter ABI Platform Actions
docker_harpoon-0.19.0-py3-none-any.whl Python 3 none any Details for docker_harpoon-0.19.0-py3-none-any.whl

Total release size: 123.0 kB

Release files / docker_harpoon-0.19.0.tar.gz

Download URL docker_harpoon-0.19.0.tar.gz
Size 53.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b9e78336caa3532195de061857d33e1623ced37fbf47b699a92d559368bc7e3e
BLAKE2b-256 checksum
How to use checksums
03c5c7b83a3359d6099bda54bd8a4a2ea3c2767590ff17af985f1afbfcd21ea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.8.19

Release files / docker_harpoon-0.19.0-py3-none-any.whl

Download URL docker_harpoon-0.19.0-py3-none-any.whl
Size 69.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfe15548df0fac9dd356198afdbbb255fe4c5aaeb628d957f5283edab9935476
BLAKE2b-256 checksum
How to use checksums
d2d0eb5fdf86924f3da4c8f58b0a550622181a274e4ebffd82ab7c8188eb9ee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.8.19

Security for docker-harpoon 0.19.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.19.0 This release

2 release files No provenance

0.5.5.2

0.5.5.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page