forked from operator-framework/operator-lifecycle-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupstream.Dockerfile
More file actions
32 lines (29 loc) · 812 Bytes
/
upstream.Dockerfile
File metadata and controls
32 lines (29 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM golang:1.13-alpine as builder
LABEL stage=builder
WORKDIR /build
RUN apk update && apk add bash make git mercurial jq && apk upgrade
# copy just enough of the git repo to parse HEAD, used to record version in OLM binaries
COPY .git/HEAD .git/HEAD
COPY .git/refs/heads/. .git/refs/heads
RUN mkdir -p .git/objects
COPY Makefile Makefile
COPY OLM_VERSION OLM_VERSION
COPY pkg pkg
COPY vendor vendor
COPY go.mod go.mod
COPY go.sum go.sum
COPY cmd cmd
COPY util util
COPY test test
RUN make build
RUN make build-util
FROM alpine:latest
LABEL stage=olm
WORKDIR /
COPY --from=builder /build/bin/olm /bin/olm
COPY --from=builder /build/bin/catalog /bin/catalog
COPY --from=builder /build/bin/package-server /bin/package-server
COPY --from=builder /build/bin/cpb /bin/cpb
EXPOSE 8080
EXPOSE 5443
CMD ["/bin/olm"]