1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-08 00:55:14 +00:00

base viz on nixery.dev/graphviz

This commit is contained in:
Jason Hall 2020-12-09 13:19:27 -05:00
parent 8ed02d0e48
commit da18b9956c
4 changed files with 4 additions and 16 deletions

View file

@ -1,6 +0,0 @@
FROM alpine
RUN apk add --update --no-cache \
ca-certificates \
graphviz \
ttf-freefont

View file

@ -11,7 +11,7 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/tmc/dot"
)
@ -166,7 +166,7 @@ func getLayers(ref name.Reference) ([]v1.Descriptor, error) {
}
func graphviz(in io.Reader, out io.Writer) error {
cmd := exec.Command("dot", "-Tsvg")
cmd := exec.Command("/bin/dot", "-Tsvg")
cmd.Stdin = in
cmd.Stdout = out
return cmd.Run()