A Docker build plugin for PyBuilder
Project description
PyBuilder Docker Build Plugin
Summary
This project is a plugin for PyBuilder that will perform a
docker build for a Python package. PyBuilder Docker Build Plugin attempts to use
sane defaults so that in most cases you only need add a Dockerfile
to your
project base directory and a docker image will be built when you call
the appropriate task.
Usage
To use this plugin in your build.py
file add the following line to the
plugins section:
use_plugin('pypi:pybuilder_docker_build')
This will add the following tasks to your build:
Task | Description |
---|---|
docker_build | Performs docker build |
docker_save | Saves docker image to dist dir |
docker_push | Pushes docker image upstream to your repo |
The following properties are available:
Property | Value | Default | Usage |
---|---|---|---|
docker_cli | True / False | False | Use docker cli to do build |
docker_path | str | docker | Path to docker executable |
docker_build_path | str | basedir property |
Path to docker build directory |
docker_build_file | str | Dockerfile | Dockerfile to use for build, relative path from docker_build_path |
docker_build_force_rm | True / False | False | Use the force rm feature of docker build |
docker_image_repo | str | project.name |
The name of the image repository |
docker_image_tag | str | latest | A tag to apply to the repository |
docker_build_args | dict | None | A dict of build args |
By default there are several build args that are supplied to the docker build, additional args can
be added with the docker_build_args
property. The default build args are:
Argument | Value |
---|---|
PROJECT_NAME | project.name |
PROJECT_VERSION | project.version |
PROJECT_DIST_VERSION | project.dist_version |
PROJECT_DIST | The relative path from the docker_build_path property to $dir_dist |
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
Built Distribution
Hashes for pybuilder-docker-build-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e796927c73071eace5fcf61bceb03c85c3b588de421d85fadd64ff7e3da1f46 |
|
MD5 | fdea83c2180661cd3e235af87f8aaf51 |
|
BLAKE2b-256 | f5ff9549b630c567431857540e55b66648da36c7b281167f38b1bae9829d8ccd |
Hashes for pybuilder_docker_build-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d2673c6f7183409fe001767a3cf5c3a2576b7a9d691875745ecbe3a6e0640d |
|
MD5 | f43893196f8a916f7be2208945dfe284 |
|
BLAKE2b-256 | 46d29697a63656ace27951c34fcf493dfb1aa147523a9c7a7589b8895c63a5bf |