Skip to content
forked from po3rin/llb2dot

llb2dot package lets you to convert BuildKit LLB to dot language to analize. You can also directly load Dockerfile

Notifications You must be signed in to change notification settings

mic-kul/llb2dot

 
 

Repository files navigation

llb2dot

CircleCI GolangCI

llb2dot package lets you to convert BuildKit LLB to dot language to analize. You also can directly load Dockerfile.

Installation

from here https://github.com/po3rin/llb2dot/releases

go get occurs unexpected error during the installation...
po3rin#1

Usage

convert llb to dot language using Dockerfile.

$ lb2dot -f ./Dockerfile

vizualize llb using dot cli.

$ llb2dot -f ./Dockerfile |  dot -T png -o result.png

also, you directory generate dot language from llb using l flag.

$ go run cmd/_testplainllb/main.go | llb2dot -l

As code

package main

import (
	"os"

	"github.com/po3rin/llb2dot"
)
func main(){
    // load llb (you want to load from Dockerfile? use LoadDockerfile)
    ops, _ := llb2dot.LoadLLB(os.Stdin)

    // convert graph
    g, _ := llb2dot.LLB2Graph(ops)

    // write graph as dot language
    llb2dot.WriteDOT(os.Stdout, g)
}

Contributing

You're most welcomed! Welcome pull request and issues.

About

llb2dot package lets you to convert BuildKit LLB to dot language to analize. You can also directly load Dockerfile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 78.1%
  • HTML 7.7%
  • JavaScript 7.1%
  • Dockerfile 3.7%
  • Makefile 3.0%
  • CSS 0.4%