Skip to main content

dog is a simple wrapper for "docker run" to make it simple to call tools residing inside docker containers

Project description

dog

test Status centos-for-dog package Status Available from PyPI Licensed under the Unlicense License

dog is a simple wrapper for docker run to make it simple to call tools residing inside docker containers.

The basic idea is that you just put "dog" in front of the command you normally call.

So if your normally use "make" to compile your code, then if your compiler tools are stored inside a docker container you just do "dog make" instead - and dog will mount you local workspace and run the correct docker container without the developer noticing at all.

The docker container to use is defined in a file called dog.config which is normally positioned in the root of your workspace and contains the name of the docker image.

Documentation

Usage, Configuration and how it works is all available here.

Installation

Dog is a single file script that only require Python 3.5+ and does not use any modules outside the ones that ship with Python.

So basically you can just clone the repo and stick a symlink to dog.py in your PATH.

Dog is also available on pypi so you should also be able to simply do:

pip install dog

# Or

python -m pip install dog

To get going.

Example

By default the docker image is fetched from the default docker registry (hub.docker.com), for instance:

[dog]
full-image=gcc:7.5

Means that:

dog gcc main.c -o main

Will compile main.c using gcc 7.5.

crossbuild-for-dog

You can see a more real-world example by looking at the crossbuild-for-dog test image that extends the standard crossbuild docker image with a dog enabled entrypoint - which can then be used to compile ARM linux executables anywhere.

The source for crossbuild-for-dog is available in tests/dockers/crossbuild-for-dog and there is a pytest verifying it in tests/test_crossbuild_for_dog.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dog-12.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

dog-12-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file dog-12.tar.gz.

File metadata

  • Download URL: dog-12.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for dog-12.tar.gz
Algorithm Hash digest
SHA256 212aa6b68d1eb7cce25749e84ec43db0087a02cf6a8718cfc5b9dc92440aca68
MD5 df3bae69969037ef766ceabd40a88328
BLAKE2b-256 ed512a027807e7c1af384a32f5f4492cdf0c25e793131ca1deaeff9db530f1d3

See more details on using hashes here.

File details

Details for the file dog-12-py3-none-any.whl.

File metadata

  • Download URL: dog-12-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for dog-12-py3-none-any.whl
Algorithm Hash digest
SHA256 35edd5f23b3d08f489413431560bf936b1f14c31181af6d357027264fed9cac7
MD5 e60616228a62e0c11ee0209e28223e96
BLAKE2b-256 e81023b8e23a3d1536d05c3481b8febb7487f6624ae0e190283f3d91492ebf73

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page