10 "git.arvados.org/arvados.git/lib/cmd"
14 handler = cmd.Multi(map[string]cmd.Handler{
15 "version": cmd.Version,
16 "-version": cmd.Version,
17 "--version": cmd.Version,
19 "gvcf2numpy": &gvcf2numpy{},
20 "build-docker-image": &buildDockerImage{},
25 os.Exit(handler.RunCommand(os.Args[0], os.Args[1:], os.Stdin, os.Stdout, os.Stderr))
28 type buildDockerImage struct{}
30 func (cmd *buildDockerImage) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
31 tmpdir, err := ioutil.TempDir("", "")
33 fmt.Fprint(stderr, err)
36 defer os.RemoveAll(tmpdir)
37 err = ioutil.WriteFile(tmpdir+"/Dockerfile", []byte(`FROM debian:10
39 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends bcftools samtools
42 fmt.Fprint(stderr, err)
45 docker := exec.Command("docker", "build", "--tag=lightning-runtime", tmpdir)
46 docker.Stdout = os.Stdout
47 docker.Stderr = os.Stderr