forked from lyft/flinkk8soperator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 938 Bytes
/
Dockerfile
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
FROM golang:1.13.0-alpine3.10 as builder
RUN apk add git openssh-client make curl bash
COPY boilerplate/lyft/golang_test_targets/dep_install.sh /go/src/github.com/lyft/flinkk8soperator/
# COPY only the dep files for efficient caching
COPY Gopkg.* /go/src/github.com/lyft/flinkk8soperator/
WORKDIR /go/src/github.com/lyft/flinkk8soperator
# Pull dependencies
RUN : \
&& sh dep_install.sh \
&& dep ensure -vendor-only
# COPY the rest of the source code
COPY . /go/src/github.com/lyft/flinkk8soperator/
# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flinkk8soperator
RUN make linux_compile
# update the PATH to include the /artifacts directory
ENV PATH="/artifacts:${PATH}"
# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.10
COPY --from=builder /artifacts /bin
CMD ["flinkoperator"]