File tree 7 files changed +27
-29
lines changed
7 files changed +27
-29
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ COPY vendor vendor
13
13
COPY cmd cmd
14
14
COPY pkg pkg
15
15
COPY Makefile Makefile
16
- RUN make static
16
+ RUN make static-rh
17
17
18
18
# copy and build vendored grpc_health_probe
19
19
RUN mkdir -p /go/src/github.com/grpc-ecosystem && \
Original file line number Diff line number Diff line change 1
- CMDS := $(addprefix bin/, $( shell go list ./cmd/... | xargs -I{} basename {}) )
2
- MOD_FLAGS := $(shell ( go version | grep -q 1.11) && echo -mod=vendor )
1
+ MOD_FLAGS := $(shell ( go version | grep -q -E "1\.(11|12) ") && echo -mod=vendor )
2
+ CMDS := $(addprefix bin/, $( shell go list $( MOD_FLAGS ) ./cmd/... | xargs -I{} basename {}) )
3
3
4
4
.PHONY : build test vendor clean
5
5
@@ -10,9 +10,12 @@ $(CMDS):
10
10
11
11
build : clean $(CMDS )
12
12
13
- static : extra_flags=-ldflags '-w -extldflags "-Wl,-Bstatic -ldl -lc -lpthread -lcrypto -lz - static"'
13
+ static : extra_flags=-ldflags '-w -extldflags "-static"'
14
14
static : build
15
15
16
+ static-rh : extra_flags=-ldflags '-w -extldflags "-Wl,-Bstatic -ldl -lc -lpthread -lcrypto -lz -static"'
17
+ static-rh : build
18
+
16
19
unit :
17
20
go test $(MOD_FLAGS ) -count=1 --tags json1 -v -race ./pkg/...
18
21
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ require (
29
29
github.com/operator-framework/go-appr v0.0.0-20180917210448-f2aef88446f2
30
30
github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190125151539-1e295784b30a
31
31
github.com/operator-framework/operator-marketplace v0.0.0-20190216021216-57300a3ef3ba
32
- github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae
33
32
github.com/sirupsen/logrus v1.2.0
34
33
github.com/soheilhy/cmux v0.1.4 // indirect
35
34
github.com/spf13/cobra v0.0.3
@@ -38,6 +37,7 @@ require (
38
37
github.com/ugorji/go v1.1.1 // indirect
39
38
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
40
39
golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7 // indirect
40
+ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
41
41
golang.org/x/tools v0.0.0-20181207222222-4c874b978acb // indirect
42
42
google.golang.org/grpc v1.17.0
43
43
k8s.io/api v0.0.0-20190118113203-912cbe2bfef3
Original file line number Diff line number Diff line change @@ -207,6 +207,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
207
207
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 /go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ =
208
208
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg =
209
209
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c /go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ =
210
+ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ =
211
+ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 /go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ =
210
212
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 /go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ =
211
213
golang.org/x/tools v0.0.0-20181011152555-a398e557df60 /go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ =
212
214
golang.org/x/tools v0.0.0-20181207222222-4c874b978acb /go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ =
Original file line number Diff line number Diff line change
1
+ FROM golang:1.12-alpine
2
+
3
+ RUN apk update && apk add sqlite build-base git mercurial
4
+ WORKDIR /build
5
+
6
+ COPY vendor vendor
7
+ COPY cmd cmd
8
+ COPY pkg pkg
9
+ COPY Makefile Makefile
10
+ COPY go.mod go.mod
11
+ RUN make static
12
+ RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
13
+ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
14
+ chmod +x /bin/grpc_health_probe
Original file line number Diff line number Diff line change 1
- FROM golang:1.11-alpine as builder
2
-
3
- RUN apk update && apk add sqlite build-base git mercurial
4
- WORKDIR /build
5
-
6
- COPY vendor vendor
7
- COPY cmd cmd
8
- COPY pkg pkg
9
- COPY Makefile Makefile
10
- COPY go.mod go.mod
11
- RUN make static
1
+ FROM quay.io/operator-framework/upstream-registry-builder as builder
12
2
13
3
COPY manifests manifests
14
4
RUN ./bin/initializer -o ./bundles.db
15
5
16
- FROM golang:1.10-alpine as probe-builder
17
-
18
- RUN apk update && apk add build-base git
19
- ENV ORG github.com/grpc-ecosystem
20
- ENV PROJECT $ORG/grpc_health_probe
21
- WORKDIR /go/src/$PROJECT
22
-
23
- COPY --from=builder /build/vendor/$ORG/grpc-health-probe .
24
- COPY --from=builder /build/vendor .
25
- RUN CGO_ENABLED=0 go install -a -tags netgo -ldflags "-w"
26
-
27
6
FROM scratch
28
7
COPY --from=builder /build/bundles.db /bundles.db
29
8
COPY --from=builder /build/bin/registry-server /registry-server
30
- COPY --from=probe- builder /go /bin/grpc_health_probe /bin/grpc_health_probe
9
+ COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
31
10
EXPOSE 50051
32
11
ENTRYPOINT ["/registry-server" ]
33
12
CMD ["--database" , "bundles.db" ]
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ golang.org/x/text/unicode/bidi
145
145
golang.org/x/text/unicode/norm
146
146
golang.org/x/text/transform
147
147
golang.org/x/text/width
148
- # golang.org/x/time v0.0.0-20181108054448-85acf8d2951c
148
+ # golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
149
149
golang.org/x/time/rate
150
150
# google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e
151
151
google.golang.org/genproto/googleapis/rpc/status
You can’t perform that action at this time.
0 commit comments