42 lines
858 B
Go
42 lines
858 B
Go
package cmd
|
|
|
|
import (
|
|
. "antoine-roux.tk/docker-multi-arch-builder/internal"
|
|
log "github.com/sirupsen/logrus"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var buildCmd = &cobra.Command{
|
|
Use: "build",
|
|
Short: "Build all multi arch manifest",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
myRegistry := Registry{
|
|
Hostname: "docker.registry",
|
|
Port: 5000,
|
|
}
|
|
|
|
manifests := []ManifestImage{
|
|
NewManifest(
|
|
"registry-ui",
|
|
"latest",
|
|
"../rasp/registry/ui/",
|
|
[]Platform{LinuxArmV6},
|
|
"",
|
|
),
|
|
NewManifest(
|
|
"haproxy-k8s",
|
|
"latest",
|
|
"../dx30/haproxy-k8s",
|
|
[]Platform{LinuxArm64, LinuxAmd64},
|
|
"",
|
|
),
|
|
}
|
|
|
|
for _, manifest := range manifests {
|
|
log.Infof("-> Deal with manifest %s folder %s\n", manifest.Name, manifest.BuildDir)
|
|
manifest.CreateLayers(myRegistry)
|
|
manifest.CreateManifest(myRegistry)
|
|
}
|
|
},
|
|
}
|