|
|
@ -13,6 +13,7 @@ var (
|
|
|
|
endpoint = flag.String("e", "", "Docker d endpoint.")
|
|
|
|
endpoint = flag.String("e", "", "Docker d endpoint.")
|
|
|
|
verbose = flag.Bool("v", false, "Verbose logging.")
|
|
|
|
verbose = flag.Bool("v", false, "Verbose logging.")
|
|
|
|
port = flag.String("p", "9000", "Port to serve dockerui.")
|
|
|
|
port = flag.String("p", "9000", "Port to serve dockerui.")
|
|
|
|
|
|
|
|
assets = flag.String("-a", "/app", "Path to the assets.")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type multiHandler struct {
|
|
|
|
type multiHandler struct {
|
|
|
@ -63,9 +64,8 @@ func createHandler(dir string) http.Handler {
|
|
|
|
func main() {
|
|
|
|
func main() {
|
|
|
|
flag.Parse()
|
|
|
|
flag.Parse()
|
|
|
|
|
|
|
|
|
|
|
|
path := fmt.Sprintf(":%s", *port)
|
|
|
|
handler := createHandler(*assets)
|
|
|
|
|
|
|
|
|
|
|
|
handler := createHandler("/app")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
path := fmt.Sprintf(":%s", *port)
|
|
|
|
log.Fatal(http.ListenAndServe(path, handler))
|
|
|
|
log.Fatal(http.ListenAndServe(path, handler))
|
|
|
|
}
|
|
|
|
}
|
|
|
|