Skip to main content

Odootools script to generate docker images

Project description

Odootools Docker

Integrate itself into odootools to generate a Dockerfile that can completely configure a base Docker Image.

The Dockerfile is built by generating a context from certain configuration.

The context itself is simply a JSON serialized text that can be obtained from provided utilities or anywhere that can output a JSON to stdout.

When the context is ready, it can be passed to the render function that will load all required templates to generate the Dockerfile.

Here's a simple example to build an Odoo15 image.

odootools docker context -v 15 | odootools docker render

Here's an example adding whtmltopdf utilities:

odootools docker context -v 15 \
| odootools docker wkhtmltopdf \
| odootools docker render

Working with odootools Docker

Odootools docker is a bit more than just a script to build docker images. It can be extended by defining your own templates that can get loaded based on the provided context.

The external templates can be provided in the context through the key template_dirs.

Then the steps list can be used to add/remove steps in the context. Those are the main templates that will get loaded by the Dockerfile renderer in the provided order.

For example:

{
  "template_dirs": "/custom/templates",
  "steps": [
    "a",
    "b",
    "c",
  ]
}

Will lookup for the template name a.jinja, b.jinja, c.jinja from /custom/templates first, then from the installed package odootools_docker.

It's possible to completely overwrite the way the context is rendered.

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

odootools_docker-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

odootools_docker-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file odootools_docker-0.1.0.tar.gz.

File metadata

  • Download URL: odootools_docker-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for odootools_docker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c968f02b1dda7d3e06ddc3e09ce6baa63a86e80ec1d8961a4483b618bcb72df9
MD5 410bc556cde3247839305608ac95b918
BLAKE2b-256 95a13318e6148696d61a9b08f5d51be06efc4c66675e35927b45c652609ded18

See more details on using hashes here.

File details

Details for the file odootools_docker-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for odootools_docker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a576c78fda69180db185dfc4f324632b8428c13841fabae5c744ec1115f4cad
MD5 c03cba2a5770c8027d8e8f9e5741b134
BLAKE2b-256 da2f929fd07a047193c2b68e407c3bb4bef1daf774fad1c7fcae27e7cff9f980

See more details on using hashes here.

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