Index: docker.io/cli/scripts/docs/generate-man.sh
===================================================================
--- docker.io.orig/cli/scripts/docs/generate-man.sh
+++ docker.io/cli/scripts/docs/generate-man.sh
@@ -2,10 +2,6 @@
 
 set -eu
 
-: "${MD2MAN_VERSION=v2.0.3}"
-
-export GO111MODULE=auto
-
 function clean {
   rm -rf "$buildir"
 }
@@ -16,19 +12,10 @@ trap clean EXIT
 (
   set -x
   cp -r . "$buildir/"
+
   cd "$buildir"
-  # init dummy go.mod
-  ./scripts/vendor init
-  # install go-md2man and copy man/tools.go in root folder
-  # to be able to fetch the required dependencies
-  go mod edit -modfile=vendor.mod -require=github.com/cpuguy83/go-md2man/v2@${MD2MAN_VERSION}
-  cp man/tools.go .
-  # update vendor
-  ./scripts/vendor update
   # build gen-manpages
-  go build -mod=vendor -modfile=vendor.mod -tags manpages -o /tmp/gen-manpages ./man/generate.go
-  # build go-md2man
-  go build -mod=vendor -modfile=vendor.mod -o /tmp/go-md2man ./vendor/github.com/cpuguy83/go-md2man/v2
+  go build -tags manpages -o /tmp/gen-manpages ./man/generate.go
 )
 
 mkdir -p man/man1
@@ -45,6 +32,6 @@ mkdir -p man/man1
       continue
     fi
     mkdir -p "./man${num}"
-    (set -x ; /tmp/go-md2man -in "$FILE" -out "./man${num}/${name}")
+    (set -x ; go-md2man -in "$FILE" -out "./man${num}/${name}")
   done
 )
