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
- https://github.com/jen-soft/pydocker
- https://github.com/dahernan/godockerize
- https://www.mankier.com/5/Containerfile
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:
This project is part of:
Hack Week 22
Activity
Comments
-
almost 3 years 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.
-
-
Similar Projects
Technical talks at universities by agamez
Description
This project aims to empower the next generation of tech professionals by offering hands-on workshops on containerization and Kubernetes, with a strong focus on open-source technologies. By providing practical experience with these cutting-edge tools and fostering a deep understanding of open-source principles, we aim to bridge the gap between academia and industry.
For now, the scope is limited to Spanish universities, since we already have the contacts and have started some conversations.
Goals
- Technical Skill Development: equip students with the fundamental knowledge and skills to build, deploy, and manage containerized applications using open-source tools like Kubernetes.
- Open-Source Mindset: foster a passion for open-source software, encouraging students to contribute to open-source projects and collaborate with the global developer community.
- Career Readiness: prepare students for industry-relevant roles by exposing them to real-world use cases, best practices, and open-source in companies.
Resources
- Instructors: experienced open-source professionals with deep knowledge of containerization and Kubernetes.
- SUSE Expertise: leverage SUSE's expertise in open-source technologies to provide insights into industry trends and best practices.