Skip to main content

A poetry plugin for configure and build docker images.

Project description

Poetry Docker Plugin

License: LGPL v3 PyPI PyPI Conventional Commits

A Poetry plugin for configuring and building docker images directly from python projects.

Installation

In order to install the plugin you need to have installed a poetry version >1.0 and type:

poetry self add poetry-docker-plugin

Usage

Add the following section to your pyproject.toml:

[tool.docker]
image_name = "org/custom_image:latest" # docker image name
args = { arg1 = "", version = "1.2.0" } # default values for args
from = "python:3.9"
labels = { "com.github.vagmcs"="Awesome", "description"="This is a test image", "version"="0.1.0" }
copy = [
    { source = "./poetry-docker-plugin-0.1.0.tar.gz", target = "/opt/pdp.tar.gz" },
#    { source = "../pyproject.toml", target = "/tmp/pp.toml" }
]
env.SERVICE_OPTS = "-Xms1g -Xmx2g -XX:+DoEscapeAnalysis -XX:+OptimizeStringConcat -XX:+DisableAttachMechanism"
env.SERVICE_CONFIGURATION = "/opt/service.conf"
volume = ["/data"]
flow = [
    { work_dir = "/opt" },
    { run = "ls" },
    { work_dir = "/tmp" },
    { run = "ls /opt" },
]
expose = [8888, 9999]
cmd = ["run_service", "--verbose"]
entrypoint = []

then, as soon as you are done configuring, type:

poetry docker

License

This project is licensed under the terms of the MIT license.

Download files

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

Source Distribution

poetry_docker_plugin-0.2.2.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

poetry_docker_plugin-0.2.2-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

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