MCPcopy Index your code
hub / github.com/perkeep/perkeep / genPerkeep

Function genPerkeep

misc/docker/dock.go:101–122  ·  view source on GitHub ↗
(ctxDir string)

Source from the content-addressed store, hash-verified

99}
100
101func genPerkeep(ctxDir string) {
102 check(os.Mkdir(filepath.Join(ctxDir, "/perkeep.org"), 0755))
103
104 args := []string{
105 "run",
106 "--rm",
107 "--volume=" + ctxDir + "/perkeep.org:/OUT",
108 "--volume=" + path.Join(dockDir, "server/build-perkeep-server.go") + ":" + genPkProgram + ":ro",
109 }
110 if isWIP() {
111 args = append(args, "--volume="+localCamliSource()+":/IN:ro",
112 goDockerImage, goCmd, "run", genPkProgram, "--rev=WIP:/IN")
113 } else {
114 args = append(args, goDockerImage, goCmd, "run", genPkProgram, "--rev="+rev())
115 }
116 cmd := exec.Command("docker", args...)
117 cmd.Stdout = os.Stdout
118 cmd.Stderr = os.Stderr
119 if err := cmd.Run(); err != nil {
120 log.Fatalf("Error building perkeepd in go container: %v", err)
121 }
122}
123
124func copyFinalDockerfile(ctxDir string) {
125 // Copy Dockerfile into the temp dir.

Callers 1

mainFunction · 0.85

Calls 8

checkFunction · 0.70
isWIPFunction · 0.70
localCamliSourceFunction · 0.70
revFunction · 0.70
CommandMethod · 0.65
RunMethod · 0.65
FatalfMethod · 0.65
MkdirMethod · 0.45

Tested by

no test coverage detected