Skip to content

Commit 8a49e62

Browse files
committed
chore(docker): update upstream.Dockerfile base to go 1.12
- Updates upstream.Dockerfile base to go 1.12 - Removes alm-ci stage
1 parent 60ce3d3 commit 8a49e62

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

upstream.Dockerfile

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
FROM quay.io/coreos/alm-ci:base as builder
1+
FROM golang:1.12-alpine as builder
22
LABEL stage=builder
3-
WORKDIR /go/src/github.com/operator-framework/operator-lifecycle-manager
4-
RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -o /bin/jq
5-
RUN chmod +x /bin/jq
6-
# Cache Dep first
7-
COPY . .
3+
WORKDIR /build
4+
5+
RUN apk update && apk add bash make git mercurial jq
6+
7+
# copy just enough of the git repo to parse HEAD, used to record version in OLM binaries
8+
COPY .git/HEAD .git/HEAD
9+
COPY .git/refs/heads/. .git/refs/heads
10+
RUN mkdir -p .git/objects
11+
COPY Makefile Makefile
12+
COPY OLM_VERSION OLM_VERSION
13+
COPY pkg pkg
14+
COPY vendor vendor
15+
COPY go.mod go.mod
16+
COPY cmd cmd
17+
COPY test test
818
RUN make build
9-
RUN go test -c -o /bin/e2e ./test/e2e/...
1019

11-
FROM alpine:latest as olm
20+
FROM alpine:latest
1221
LABEL stage=olm
1322
WORKDIR /
14-
COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager/bin/olm /bin/olm
15-
COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager/bin/catalog /bin/catalog
16-
COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager/bin/package-server /bin/package-server
23+
COPY --from=builder /build/bin/olm /bin/olm
24+
COPY --from=builder /build/bin/catalog /bin/catalog
25+
COPY --from=builder /build/bin/package-server /bin/package-server
1726
EXPOSE 8080
1827
EXPOSE 5443
19-
CMD ["/bin/olm"]
20-
21-
FROM quay.io/coreos/alm-ci:base
22-
LABEL stage=e2e
23-
RUN mkdir -p /var/e2e
24-
WORKDIR /var/e2e
25-
COPY --from=builder /bin/e2e /bin/e2e
26-
COPY --from=builder /bin/jq /bin/jq
27-
COPY ./test/e2e/e2e.sh /var/e2e/e2e.sh
28-
COPY ./test/e2e/tap.jq /var/e2e/tap.jq
29-
CMD ["/bin/e2e"]
28+
CMD ["/bin/olm"]

0 commit comments

Comments
 (0)