setuptools-docker


Namesetuptools-docker JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/jcharlytown/setuptools-docker
SummaryA setuptools extension for building docker images for distribution
upload_time2023-03-12 21:32:25
maintainer
docs_urlNone
authorJulian Faude
requires_python>=3.8
licenseApache-2.0
keywords packaging docker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # setuptools-docker

A light-weight setuptools extension for building docker images from python
projects.

Python wheels are the preferred packaging format for distributing python
libraries or applications. However, in cloud native computation services
get packaged and deployed as docker/oci images. This project aims at
making the packaging of python services for such environments as easy
and as repeatable as building a wheel. It takes heavy inspiration from
[jib](https://github.com/GoogleContainerTools/jib).

## Usage

setuptools-docker extends setuptools with one additional command:
`bdist_docker`. It will typically be used like this:

```commandline
python -m setup bdist_docker
```

For a reference of arguments see `python -m setup bdist_docker --help`

## Configuration via file

setuptools-docker utilizes the configuration mechanisms of setuptools
itself, e.g., `setup.cfg`. 

It adds a new section `[bdist_docker]`, e.g.:
```ini
[bdist_docker]
extra_requires =
    gunicorn
user_id = 1100
environment_vars =
    FIZZ=BUZZ
```

### Options
| Key                       | Type | Description                                                       | Default                  |
|---------------------------|------|-------------------------------------------------------------------|--------------------------|
| image_name                | str  | image name (optionally incl. registry)                            | metadata name            |
| image_tag                 | str  | image tag                                                         | metadata version         |
| requirements_file         | str  | pip requirements file to install into image                       |                          |
| extra_requires            | list | extras to install alongside wheel                                 |                          |
| index_url                 | str  | pip index url to install dependencies from                        | (pip default index)      |
| index_username            | str  | username for authentication to PIP index                          |                          |
| index_password            | str  | password for authentication to PIP index                          |                          |
| base_image                | str  | base image for final stage                                        | python:3.8-slim-bullseye |
| extra_os_packages         | list | extra deb packages to install into final stage                    |                          |
| builder-extra-os-packages | list | extra deb packages to install into builder stage                  |                          |
| user_id                   | int  | user id for docker USER directive                                 |                          |
| entrypoint                | list | entrypoint in exec form                                           |                          |
| command                   | list | command in exec form                                              |                          |
| init_scripts              | list | path/to/extra/init/scripts to run (prior to provided entrypoint ) |                          |
| pip_cache_docker          | bool | whether to use docker cache for pip cache dir                     | True                     |
| environment_vars          | list | environment variables to set via docker ENV directive             |                          |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jcharlytown/setuptools-docker",
    "name": "setuptools-docker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "packaging,docker",
    "author": "Julian Faude",
    "author_email": "github@julianfau.de",
    "download_url": "https://files.pythonhosted.org/packages/a5/07/ffa1b5e1b156a96fd6b3737c4dfdbc84e4b5fcdc31b1b0a150dde600bd67/setuptools_docker-0.1.0.tar.gz",
    "platform": null,
    "description": "# setuptools-docker\n\nA light-weight setuptools extension for building docker images from python\nprojects.\n\nPython wheels are the preferred packaging format for distributing python\nlibraries or applications. However, in cloud native computation services\nget packaged and deployed as docker/oci images. This project aims at\nmaking the packaging of python services for such environments as easy\nand as repeatable as building a wheel. It takes heavy inspiration from\n[jib](https://github.com/GoogleContainerTools/jib).\n\n## Usage\n\nsetuptools-docker extends setuptools with one additional command:\n`bdist_docker`. It will typically be used like this:\n\n```commandline\npython -m setup bdist_docker\n```\n\nFor a reference of arguments see `python -m setup bdist_docker --help`\n\n## Configuration via file\n\nsetuptools-docker utilizes the configuration mechanisms of setuptools\nitself, e.g., `setup.cfg`. \n\nIt adds a new section `[bdist_docker]`, e.g.:\n```ini\n[bdist_docker]\nextra_requires =\n    gunicorn\nuser_id = 1100\nenvironment_vars =\n    FIZZ=BUZZ\n```\n\n### Options\n| Key                       | Type | Description                                                       | Default                  |\n|---------------------------|------|-------------------------------------------------------------------|--------------------------|\n| image_name                | str  | image name (optionally incl. registry)                            | metadata name            |\n| image_tag                 | str  | image tag                                                         | metadata version         |\n| requirements_file         | str  | pip requirements file to install into image                       |                          |\n| extra_requires            | list | extras to install alongside wheel                                 |                          |\n| index_url                 | str  | pip index url to install dependencies from                        | (pip default index)      |\n| index_username            | str  | username for authentication to PIP index                          |                          |\n| index_password            | str  | password for authentication to PIP index                          |                          |\n| base_image                | str  | base image for final stage                                        | python:3.8-slim-bullseye |\n| extra_os_packages         | list | extra deb packages to install into final stage                    |                          |\n| builder-extra-os-packages | list | extra deb packages to install into builder stage                  |                          |\n| user_id                   | int  | user id for docker USER directive                                 |                          |\n| entrypoint                | list | entrypoint in exec form                                           |                          |\n| command                   | list | command in exec form                                              |                          |\n| init_scripts              | list | path/to/extra/init/scripts to run (prior to provided entrypoint ) |                          |\n| pip_cache_docker          | bool | whether to use docker cache for pip cache dir                     | True                     |\n| environment_vars          | list | environment variables to set via docker ENV directive             |                          |\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A setuptools extension for building docker images for distribution",
    "version": "0.1.0",
    "split_keywords": [
        "packaging",
        "docker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53c2f3831f271e55cd80845fa6ddda3acce4ee9cb5ae5e2a2162c1a9515b13bc",
                "md5": "13ea29e032c2a53631669973d355f4e8",
                "sha256": "390c8c074bf3e0139fcbc82fb1b1ad8b963813116b76ac892c9c3b6a840922f4"
            },
            "downloads": -1,
            "filename": "setuptools_docker-0.1.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "13ea29e032c2a53631669973d355f4e8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 11805,
            "upload_time": "2023-03-12T21:32:23",
            "upload_time_iso_8601": "2023-03-12T21:32:23.666845Z",
            "url": "https://files.pythonhosted.org/packages/53/c2/f3831f271e55cd80845fa6ddda3acce4ee9cb5ae5e2a2162c1a9515b13bc/setuptools_docker-0.1.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a507ffa1b5e1b156a96fd6b3737c4dfdbc84e4b5fcdc31b1b0a150dde600bd67",
                "md5": "1bc7e8db1e905ac6f9afcb1dabdaf5d4",
                "sha256": "7d6d9e7846c8fd646956d583ba5c79f07889be41db4bd1d08b0ffe64ea7708b1"
            },
            "downloads": -1,
            "filename": "setuptools_docker-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1bc7e8db1e905ac6f9afcb1dabdaf5d4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16840,
            "upload_time": "2023-03-12T21:32:25",
            "upload_time_iso_8601": "2023-03-12T21:32:25.480114Z",
            "url": "https://files.pythonhosted.org/packages/a5/07/ffa1b5e1b156a96fd6b3737c4dfdbc84e4b5fcdc31b1b0a150dde600bd67/setuptools_docker-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-12 21:32:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "jcharlytown",
    "github_project": "setuptools-docker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "setuptools-docker"
}
        
Elapsed time: 0.05107s