Skip to content

Commit eeea4b1

Browse files
authored
set GO111MODULE=on for chrusty/protoc-gen-jsonschema and atlas_patch (#149)
1 parent 90128b7 commit eeea4b1

1 file changed

Lines changed: 24 additions & 20 deletions

File tree

Dockerfile

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARG PGP_VERSION=master
1111

1212
# Set up mandatory Go environmental variables.
1313
ENV CGO_ENABLED=0
14-
ENV GO111MODULE=on
14+
ENV GO111MODULE=off
1515

1616
RUN apk update \
1717
&& apk add --no-cache --purge git curl upx
@@ -50,32 +50,34 @@ RUN sed -e "s/@AATVersion/$AAT_VERSION/" \
5050
RUN glide up --skip-test
5151
RUN cp -r vendor/* ${GOPATH}/src/
5252

53-
RUN go install github.com/golang/protobuf/protoc-gen-go@latest
54-
RUN go install github.com/gogo/protobuf/protoc-gen-combo@latest
55-
RUN go install github.com/gogo/protobuf/protoc-gen-gofast@latest
56-
RUN go install github.com/gogo/protobuf/protoc-gen-gogo@latest
57-
RUN go install github.com/gogo/protobuf/protoc-gen-gogofast@latest
58-
RUN go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest
59-
RUN go install github.com/gogo/protobuf/protoc-gen-gogoslick@latest
60-
RUN go install github.com/gogo/protobuf/protoc-gen-gogotypes@latest
61-
RUN go install github.com/gogo/protobuf/protoc-gen-gostring@latest
62-
RUN go get github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest
63-
RUN go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest
64-
RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@latest
65-
RUN go install github.com/envoyproxy/protoc-gen-validate@latest
66-
RUN go install github.com/mwitkow/go-proto-validators/protoc-gen-govalidators@latest
67-
RUN go install github.com/pseudomuto/protoc-gen-doc/cmd/...@latest
68-
RUN go install github.com/infobloxopen/protoc-gen-preprocess@latest
53+
RUN go install github.com/golang/protobuf/protoc-gen-go
54+
RUN go install github.com/gogo/protobuf/protoc-gen-combo
55+
RUN go install github.com/gogo/protobuf/protoc-gen-gofast
56+
RUN go install github.com/gogo/protobuf/protoc-gen-gogo
57+
RUN go install github.com/gogo/protobuf/protoc-gen-gogofast
58+
RUN go install github.com/gogo/protobuf/protoc-gen-gogofaster
59+
RUN go install github.com/gogo/protobuf/protoc-gen-gogoslick
60+
RUN go install github.com/gogo/protobuf/protoc-gen-gogotypes
61+
RUN go install github.com/gogo/protobuf/protoc-gen-gostring
62+
ENV GO111MODULE=on
63+
RUN go get github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@switch_jsonschema_library
64+
RUN go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@switch_jsonschema_library
65+
ENV GO111MODULE=off
66+
RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
67+
RUN go install github.com/envoyproxy/protoc-gen-validate
68+
RUN go install github.com/mwitkow/go-proto-validators/protoc-gen-govalidators
69+
RUN go install github.com/pseudomuto/protoc-gen-doc/cmd/...
70+
RUN go install github.com/infobloxopen/protoc-gen-preprocess
6971
RUN go install \
7072
-ldflags "-X github.com/infobloxopen/protoc-gen-gorm/plugin.ProtocGenGormVersion=$PGG_VERSION -X github.com/infobloxopen/protoc-gen-gorm/plugin.AtlasAppToolkitVersion=$AAT_VERSION" \
71-
github.com/infobloxopen/protoc-gen-gorm@latest
73+
github.com/infobloxopen/protoc-gen-gorm
7274
# Download all dependencies of protoc-gen-atlas-query-validate
7375
RUN cd ${GOPATH}/src/github.com/infobloxopen/protoc-gen-atlas-query-validate && dep ensure -vendor-only
74-
RUN go install github.com/infobloxopen/protoc-gen-atlas-query-validate@latest
76+
RUN go install github.com/infobloxopen/protoc-gen-atlas-query-validate
7577

7678
# Download all dependencies of protoc-gen-atlas-validate
7779
RUN cd ${GOPATH}/src/github.com/infobloxopen/protoc-gen-atlas-validate && dep ensure -vendor-only
78-
RUN go install github.com/infobloxopen/protoc-gen-atlas-validate@latest
80+
RUN go install github.com/infobloxopen/protoc-gen-atlas-validate
7981

8082
RUN mkdir -p /out/usr/bin
8183

@@ -90,9 +92,11 @@ RUN go get github.com/go-openapi/spec && \
9092
git clone --single-branch -b atlas-patch https://github.com/infobloxopen/grpc-gateway.git && \
9193
cd grpc-gateway/protoc-gen-swagger && go build -o /out/usr/bin/protoc-gen-swagger main.go
9294

95+
ENV GO111MODULE=on
9396
# Build with infoblox atlas_patch.
9497
RUN cd ${GOPATH}/src/github.com/infobloxopen && git clone --single-branch -b v1.0.1 https://github.com/infobloxopen/atlas-openapiv2-patch.git && \
9598
cd ${GOPATH}/src/github.com/infobloxopen/atlas-openapiv2-patch && go mod vendor && go build -o /out/usr/bin/atlas_patch ./cmd/server/.
99+
ENV GO111MODULE=on
96100

97101
RUN mkdir -p /out/protos && \
98102
find ${GOPATH}/src -name "*.proto" -exec cp --parents {} /out/protos \;

0 commit comments

Comments
 (0)