🗂 Yet Another One Way to Handle Your Dockerfiles with Kotlin

Overview

🐳 Dokker

The Kotlin DSL to generate your project Dockerfiles with Kotlin.

Example

The library is created with one purpose: allow easy generation of multiple Dockerfiles with Kotlin. Check out the example below:

val aptPackages = listOf(
    "build-essential",
    "python3",
    "python3-pip"
)
val environment = mapOf(
    "PYTHON_VERSION" to "3.9.6"
)
val ignores = listOf(
    ".venv"
)
val resources = listOf(
    "examples/.python_version"
)
val project = dokker(resources = resources, ignores = ignores) {
    from("ubuntu")
    arg("platform")
    label(
        mapOf(
            "maintainer" to "[email protected]"
        )
    )
    user("root")
    env(environment)
    kopy(listOf(".python_version"), "/tmp")
    run(
        listOf(
            aptInstall(aptPackages),
            "echo ${envBraces("PYTHON_VERSION")}"
        )
    )
    expose(8080)
    workdir("/")
    entrypoint("python3")
    comment("We did it!")
}
project.save("python-example")

With the above code, you can generate a project like this.

Contribution

Feel free to extend the Dokker with anything you want : create an issue or send a pull request!

You might also like...
SimpleYelp - A basic clone of the restaurant review app, Yelp. This app has just one screen, but the data is fetched from the Yelp API Bring together all of the remarkable Computer Graphics Algorithms in one place 🚀
Bring together all of the remarkable Computer Graphics Algorithms in one place 🚀

Compose Computer Graphics Playground 🚀 "There was an idea to bring together all of the remarkable Computer Graphics Algorithms in one place. And keep

Checks for app updates and automatically updates the current app if the new one in local storage have a different version

Silent Android App Update Sample This sample shows how to update Android app silently without user confirmation with a device owner app. It works on A

If you had one month to visit the best places in Kenya, where would you go?
If you had one month to visit the best places in Kenya, where would you go?

VisitKenya If you had one month to visit the best places in Kenya, where would you go? This app just shows you sample places where you could visit, wi

🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.
🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

A project to show the best way to build an Android app on 2022 (by me).
A project to show the best way to build an Android app on 2022 (by me).

Hello Architecture I create this project to show what's for me the best way to build an Android app on 2022. Architecture I use this diagram as and id

Easy app for managing your files without ads, respecting your privacy & security
Easy app for managing your files without ads, respecting your privacy & security

Simple File Manager Can also be used for browsing root files and SD card content. You can easily rename, copy, move, delete and share anything you wis

To help to promote your android app by prompting users to rate your app in a bottom Sheet.

RateBottomSheet This an Android library to help to promote your Android App by prompting users to rate your app in the Google Play Store with a materi

TakeNotes, taking care of your tasks and your health
TakeNotes, taking care of your tasks and your health

Take Notes - Para tornar sua rotina mais Saudável TakeNotes, cuidando de suas tarefas e de sua saúde Sobre • Funcionalidades • Layout • Como executar

Releases(0.2.4)
Owner
Viktor
(Y)ML Engineer · I don't like to train Deep Neural Nets on large datasets
Viktor
Project created in order to handle account management

Account Service App Aplicação responsável em receber dados de uma conta, validá-los e retornar mensagem de sucesso ou erro. Tecnologias utilizadas - L

Rafael Alberto 0 Dec 14, 2021
🍣✨ Simple Ktor server to handle GitHub -> YouTrack, usually for YouTrack Standalone.

?? sushi Simple Ktor server to handle GitHub Issues to YouTrack, usually for YouTrack Standalone. Why? There is not really a definite way to handle Gi

Noelware 2 Nov 11, 2021
Cago provides you way to do complex calculations on your device.

Cago Do your calculations easier. Cago provides you way to do complex calculations on your device. You can build functions that fit your goals by your

null 0 Feb 13, 2022
Push notification application using One Signal + Spring Boot + Kotlin

Spring Boot push notification system using One Signal This project was created to demonstrate a simple application built with Kotlin + Spring Boot inc

Mário Fronza 3 Aug 30, 2022
Inter Android Developer na Digital Innovation one

Desafios do Bootcamp Inter Android Developer Desafios Matemáticos em Kotlin Desafio Desafio Solução 1 Análise de Números Código 2 Consumo Médio do Aut

Luiz Correa 7 Nov 29, 2022
An Online Meme Sharing app with swipeable vidoes, user can like, share different videos, each viewpager item has one video to show.

MemesSharing An Online Meme Sharing app with swipeable vidoes, user can like, share different videos, each viewpager item has one video to show. 1. Fl

Vikas Bajpayee 13 Aug 6, 2022
Combine some useful exts in One place

Helper Extensions Extensions Combine some useful exts in One place Examples : this.errorMsg(msg = "Test error" , duration = 6000)

Mostafa Gad 0 Dec 31, 2021
Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Clean ViewModel with Sealed Classes Following are the purposes of this repo Showing how you can remove the need of context in ViewModels. I. By using

Kashif Mehmood 22 Oct 26, 2022
One app for all women that covers everything from safety to health and more. 👩💪

sampoorna Sampoorna is a one-in-all solution concept revolving around the women who fight one on one with various problems. With it's features encapsu

Open Lake 17 Dec 6, 2022