Browse code

go-swagger: fix panic

This is an attempt to fix go-swagger panic under Golang 1.13.

Details:
* https://github.com/go-openapi/jsonpointer/pull/4
* https://github.com/go-swagger/go-swagger/pull/2059

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2019/10/04 10:57:29
Showing 1 changed files
... ...
@@ -60,12 +60,14 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
60 60
 
61 61
 FROM base AS swagger
62 62
 # Install go-swagger for validating swagger.yaml
63
-ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb
63
+# This is https://github.com/kolyshkin/go-swagger/tree/golang-1.13-fix
64
+# TODO: move to under moby/ or fix upstream go-swagger to work for us.
65
+ENV GO_SWAGGER_COMMIT 5793aa66d4b4112c2602c716516e24710e4adbb5
64 66
 RUN --mount=type=cache,target=/root/.cache/go-build \
65 67
 	--mount=type=cache,target=/go/pkg/mod \
66 68
 		set -x \
67 69
 		&& export GOPATH="$(mktemp -d)" \
68
-		&& git clone https://github.com/go-swagger/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \
70
+		&& git clone https://github.com/kolyshkin/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \
69 71
 		&& (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT") \
70 72
 		&& go build -o /build/swagger github.com/go-swagger/go-swagger/cmd/swagger \
71 73
 		&& rm -rf "$GOPATH"