Project Description

Writing container definition files is boring and error-prone: let's use power of a programming language to generate containers!

Project purpose:

  • Experiment about container creation workflow and container management/publishing/versioning
  • Play with a new non-mainstream programming language and show off capabilities/ease of usage. Ideally I plan to use nim, if time permits also experiment with others
  • Follow Test-Driven Development (TDD) practices
  • Have fun

Advantages:

  • all features of a proper language: variables, multiline strings, logic statements, loops, code reuse.
  • static syntax checking, no more typos or duplicate entries
  • generate many docker files from one template [testing, production, ... ]
  • generate sequence [Dockerfile.suse => Dockerfile.python => Dockerfile.yourapp, ...]
  • could generate command line snippets or CI build scripts with the same data
  • optimize container image creation removing redundant layers

Goal for this Hackweek

Preliminary study and make a proof of concept on a github repo with some working examples

Resources

Further ideas

  • secret scan to avoid API key/tokens leaks
  • optional "runtime" checking
  • extend for multi_stage, docker compose
  • import existing Dockerfile
  • sanitize / check for issues ("linting")
  • iterate on generation by extending to YAML format: k8s manifests, github workflows ...

Looking for hackers with the skills:

nim docker podman containers

This project is part of:

Hack Week 22

Activity

  • about 1 year ago: fgiudici liked this project.
  • about 1 year ago: xgonzo liked this project.
  • about 1 year ago: ilausuch liked this project.
  • about 1 year ago: danishprakash liked this project.
  • about 1 year ago: dancermak liked this project.
  • about 1 year ago: amanzini added keyword "containers" to this project.
  • about 1 year ago: amanzini added keyword "nim" to this project.
  • about 1 year ago: amanzini added keyword "docker" to this project.
  • about 1 year ago: amanzini added keyword "podman" to this project.
  • about 1 year ago: amanzini started this project.
  • about 1 year ago: amanzini originated this project.

  • Comments

    • dancermak
      about 1 year ago by dancermak | Reply

      We are currently generating the Dockerfiles for the BCI images via python: https://github.com/SUSE/BCI-dockerfile-generator/tree/main/src/bci_build This is probably not what you are looking for, as it's really just a wrapper around jinja2 templates, but maybe it can help you out a bit.

    • amanzini
      about 1 year ago by amanzini | Reply

      project is online at https://github.com/ilmanzo/containertools

    • amanzini
      about 1 year ago by amanzini | Reply

      published v0.1.0 on the NIM package directory: https://nimble.directory/pkg/containertools

    Similar Projects

    Package MONAI Machine Learning Models for Medical Applications by jordimassaguerpla

    Project Description

    MONAI Deploy aims to ...


    Containerized home mirror by lkocman

    I'm running a simple home mirror, but I managed...


    Predefined app security policy template for NeuVector by feih

    Project Description

    Idea is to predefin...


    Building a container bootloader by flonnegren

    [comment]: # (Please use the project descriptio...


    A set of utilities to produce a "from scratch" OCI/Docker container using Opensuse/SLE rpms by ldragon

    [comment]: # (Please use the project descriptio...