ibuilder


Nameibuilder JSON
Version 3.7.0 PyPI version JSON
download
home_pagehttps://gitlab.com/drad/ibuilder
Summarybuild, tag, push, and sign docker images
upload_time2024-05-03 15:41:34
maintainerdrad
docs_urlNone
authordrad
requires_python<4.0,>=3.11
licenseGPL-3.0-only
keywords cli docker containers build ci cd image tag git push sign cosign
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # README

ibuilder is a [cli](https://en.wikipedia.org/wiki/Command-line_interface) based builder of [docker](https://hub.docker.com/) images. It provides an interface for building and pushing the image, signing images, as well as for tagging source code after build with a build version and other common image tasks.


### Latest Changes

- cleaned up version and config's usage of importlib.metadata and/or pkg_resources (removed pkg_resources)
- change python version requirement from 3.8+ to 3.11+ (for speed and to leverage internal tomllib)
- update copyright date
- package updates: idna, pydantic, typer, typing-extensions


### NOTICES

- version 1.0.0 requires python 3.11+ (for internal toml processing capabilities and its fast)


### Features

- build: build docker images
- push: push images to any container registry
- sign: sign images for container signing and verification
- source control: tag and push when you build an image
- history: retain build history for quick/easy access to past build info
- quick/easy: create an `ibuilder.toml` file and run `ib build -i minor` to build, push, commit to source control and sign a new image


### Requirements

- python 3
- docker: docker must be set up as it is used to build and push the image
- git: (optional) if you use the source-tag feature you will need git installed and your code setup in git (it simply performs a git tag && git push from the working directory)
- image signor: (optional) if you choose to sign images a signor (such as cosign) is needed


### Overview

- setup (see #setup)
- configure (see #configure): place a copy of the `example/.ibuilder.toml` in the same directory as your Dockerfile of the app you want to build and adjust it as needed
- run (see #run): execute ibuilder to build/push/tag a version of your app, its as simple as `ib build`


### Install

We recommend using [pipx](https://github.com/pypa/pipx) to install ibuilder: `pipx install ibuilder`. You can also install via pip: `pip install --user ibuilder`.


### Setup

ibuilder uses a config file to store your setup. Each 'app' you build with ibuilder expects this file to be in the 'root' of the app that you are building. This file contains information such as whether to build, push, tag the image, labels to apply, Dockerfile to use, etc. You can grab an example config file from  [ibuilder/example/.ibuilder.toml](https://gitlab.com/drad/ibuilder/-/blob/master/example/.ibuilder.toml).


### Configure

- create a project config file
  - place a copy of the `example/.ibuilder.toml` file in your project (same directory as your Dockerfile) and configure as needed


### Features

If you create an arg with the name "BUILD_VERSION" its value will be replaced with the build version of the current build. This can be used to pass the build version from ibuilder into your docker environment.


### Run

- basic run: `ib build --version=1.2.3`
  - the above command assumes there is a `.ibuilder.toml` in the current working directory which happens to be in the same directory as the Dockerfile which you wish to build
- change logging level: `LOG_LEVEL=DEBUG ib build...`
  + standard python log levels supported: CRITICAL|ERROR|WARNING|INFO|DEBUG (default is INFO)
View help with `ib --help` or see help for a specific command: `ib build --help`.


### Recommendations

We recommend using docker's configuration storage for reg_auth-* related configuration items as it encrypts sensitive information and is likely already configured (if you have already used `docker login`). If you leave the remaining items empty the default values will be used. This will then try `$HOME/.docker/config.json` and `$HOME/.dockercfg` for your docker config settings. If you do not already have a docker config run `docker login` and it should be created for you. After a successful login you should not need to do anything else for the application as the needed info will be stored in your dockercfg and the app will use it when needed.

If you are signing your images you may want to set the `COSIGN_PASSWORD` environment variable in your `~/.bashrc` or equivalent shell config file to avoid being prompted for your signing password after build and push. It should be noted that you will be prompted twice (if you are pushing both the build version and the `latest` tag of this version) as ib signs both tags of the built image. To avoid this we recommend setting the `COSIGN_PASSWORD` environment variable but please ensure you understand the security implications of doing so.


### Legacy

This project originally started under the name boi - builder of images and as such you may find references to boi and even backward support for boi (e.g. local history database, user config file, etc.).


### Links

- [typer](https://typer.tiangolo.com/)
- [docker](https://pypi.org/project/docker/)
  - [docs](https://docker-py.readthedocs.io/en/stable/)
- [toml](https://pypi.org/project/toml/)
            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/drad/ibuilder",
    "name": "ibuilder",
    "maintainer": "drad",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "sa@adercon.com",
    "keywords": "cli, docker, containers, build, ci, cd, image, tag, git, push, sign, cosign",
    "author": "drad",
    "author_email": "sa@adercon.com",
    "download_url": "https://files.pythonhosted.org/packages/86/f7/e0fd591ce90716bd36926b3b62dca212b767edf01dc55d4b4ead3221d7b3/ibuilder-3.7.0.tar.gz",
    "platform": null,
    "description": "# README\n\nibuilder is a [cli](https://en.wikipedia.org/wiki/Command-line_interface) based builder of [docker](https://hub.docker.com/) images. It provides an interface for building and pushing the image, signing images, as well as for tagging source code after build with a build version and other common image tasks.\n\n\n### Latest Changes\n\n- cleaned up version and config's usage of importlib.metadata and/or pkg_resources (removed pkg_resources)\n- change python version requirement from 3.8+ to 3.11+ (for speed and to leverage internal tomllib)\n- update copyright date\n- package updates: idna, pydantic, typer, typing-extensions\n\n\n### NOTICES\n\n- version 1.0.0 requires python 3.11+ (for internal toml processing capabilities and its fast)\n\n\n### Features\n\n- build: build docker images\n- push: push images to any container registry\n- sign: sign images for container signing and verification\n- source control: tag and push when you build an image\n- history: retain build history for quick/easy access to past build info\n- quick/easy: create an `ibuilder.toml` file and run `ib build -i minor` to build, push, commit to source control and sign a new image\n\n\n### Requirements\n\n- python 3\n- docker: docker must be set up as it is used to build and push the image\n- git: (optional) if you use the source-tag feature you will need git installed and your code setup in git (it simply performs a git tag && git push from the working directory)\n- image signor: (optional) if you choose to sign images a signor (such as cosign) is needed\n\n\n### Overview\n\n- setup (see #setup)\n- configure (see #configure): place a copy of the `example/.ibuilder.toml` in the same directory as your Dockerfile of the app you want to build and adjust it as needed\n- run (see #run): execute ibuilder to build/push/tag a version of your app, its as simple as `ib build`\n\n\n### Install\n\nWe recommend using [pipx](https://github.com/pypa/pipx) to install ibuilder: `pipx install ibuilder`. You can also install via pip: `pip install --user ibuilder`.\n\n\n### Setup\n\nibuilder uses a config file to store your setup. Each 'app' you build with ibuilder expects this file to be in the 'root' of the app that you are building. This file contains information such as whether to build, push, tag the image, labels to apply, Dockerfile to use, etc. You can grab an example config file from  [ibuilder/example/.ibuilder.toml](https://gitlab.com/drad/ibuilder/-/blob/master/example/.ibuilder.toml).\n\n\n### Configure\n\n- create a project config file\n  - place a copy of the `example/.ibuilder.toml` file in your project (same directory as your Dockerfile) and configure as needed\n\n\n### Features\n\nIf you create an arg with the name \"BUILD_VERSION\" its value will be replaced with the build version of the current build. This can be used to pass the build version from ibuilder into your docker environment.\n\n\n### Run\n\n- basic run: `ib build --version=1.2.3`\n  - the above command assumes there is a `.ibuilder.toml` in the current working directory which happens to be in the same directory as the Dockerfile which you wish to build\n- change logging level: `LOG_LEVEL=DEBUG ib build...`\n  + standard python log levels supported: CRITICAL|ERROR|WARNING|INFO|DEBUG (default is INFO)\nView help with `ib --help` or see help for a specific command: `ib build --help`.\n\n\n### Recommendations\n\nWe recommend using docker's configuration storage for reg_auth-* related configuration items as it encrypts sensitive information and is likely already configured (if you have already used `docker login`). If you leave the remaining items empty the default values will be used. This will then try `$HOME/.docker/config.json` and `$HOME/.dockercfg` for your docker config settings. If you do not already have a docker config run `docker login` and it should be created for you. After a successful login you should not need to do anything else for the application as the needed info will be stored in your dockercfg and the app will use it when needed.\n\nIf you are signing your images you may want to set the `COSIGN_PASSWORD` environment variable in your `~/.bashrc` or equivalent shell config file to avoid being prompted for your signing password after build and push. It should be noted that you will be prompted twice (if you are pushing both the build version and the `latest` tag of this version) as ib signs both tags of the built image. To avoid this we recommend setting the `COSIGN_PASSWORD` environment variable but please ensure you understand the security implications of doing so.\n\n\n### Legacy\n\nThis project originally started under the name boi - builder of images and as such you may find references to boi and even backward support for boi (e.g. local history database, user config file, etc.).\n\n\n### Links\n\n- [typer](https://typer.tiangolo.com/)\n- [docker](https://pypi.org/project/docker/)\n  - [docs](https://docker-py.readthedocs.io/en/stable/)\n- [toml](https://pypi.org/project/toml/)",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "build, tag, push, and sign docker images",
    "version": "3.7.0",
    "project_urls": {
        "Homepage": "https://gitlab.com/drad/ibuilder",
        "Repository": "https://gitlab.com/drad/ibuilder"
    },
    "split_keywords": [
        "cli",
        " docker",
        " containers",
        " build",
        " ci",
        " cd",
        " image",
        " tag",
        " git",
        " push",
        " sign",
        " cosign"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6ce777fd858dbc8a358ff528774e40c5b6f834ea3e037c8f7e23bf8981c6ae3",
                "md5": "55cbdc48c3f09d1488821ac316f09e8e",
                "sha256": "e22aff9806d02a8a667c00530bbd5982a4a18429376846d56efa6907a3692b82"
            },
            "downloads": -1,
            "filename": "ibuilder-3.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55cbdc48c3f09d1488821ac316f09e8e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 30696,
            "upload_time": "2024-05-03T15:41:33",
            "upload_time_iso_8601": "2024-05-03T15:41:33.379795Z",
            "url": "https://files.pythonhosted.org/packages/d6/ce/777fd858dbc8a358ff528774e40c5b6f834ea3e037c8f7e23bf8981c6ae3/ibuilder-3.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86f7e0fd591ce90716bd36926b3b62dca212b767edf01dc55d4b4ead3221d7b3",
                "md5": "17fb113e04e83934f734254c33bbcde8",
                "sha256": "11ad52ee91e003dd5a98b2b481eb611d7d5503886d4bbc6c216de40b1bdfed38"
            },
            "downloads": -1,
            "filename": "ibuilder-3.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "17fb113e04e83934f734254c33bbcde8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 28198,
            "upload_time": "2024-05-03T15:41:34",
            "upload_time_iso_8601": "2024-05-03T15:41:34.573937Z",
            "url": "https://files.pythonhosted.org/packages/86/f7/e0fd591ce90716bd36926b3b62dca212b767edf01dc55d4b4ead3221d7b3/ibuilder-3.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 15:41:34",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "drad",
    "gitlab_project": "ibuilder",
    "lcname": "ibuilder"
}
        
Elapsed time: 0.25970s