A poetry plugin for configure and build docker images.
Project description
Poetry Docker Plugin
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.
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
Close
Hashes for poetry_docker_plugin-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98df359e74ac6b6c5f9abe095eb10d1428e6ce25df64b65ba1f4c7d9b98c73d |
|
MD5 | aab9cabaa13fe701e03d0519225b8f10 |
|
BLAKE2b-256 | ab5919f8e1770fa8c15fea3d39bc6a251640793752ef9cb88066b74fb398fe52 |
Close
Hashes for poetry_docker_plugin-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 584d4db5a95058f749dfddbf61b90330fe7cd2dd0f2be12a9b12b643bc1ca878 |
|
MD5 | cf8ecc9e9e83ad1a068c32e939942b1c |
|
BLAKE2b-256 | 16f375574f6693feb6bbf681803654a06a85e6ce3552853f830184755c428715 |