forked from wave-k8s/wave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 781 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
# Build the manager binary
FROM golang:1.12 as builder
ARG VERSION=undefined
# Install Dep
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# Copy in the go src
WORKDIR /go/src/github.com/wave-k8s/wave
COPY Gopkg.lock Gopkg.lock
COPY Gopkg.toml Gopkg.toml
# Fetch dependencies before copying code (should cache unless Gopkg's change)
RUN dep ensure --vendor-only
COPY pkg/ pkg/
COPY cmd/ cmd/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o wave -ldflags="-X main.VERSION=${VERSION}" github.com/wave-k8s/wave/cmd/manager
# Copy the controller-manager into a thin image
FROM alpine:3.11
RUN apk --no-cache add ca-certificates
WORKDIR /bin
COPY --from=builder /go/src/github.com/wave-k8s/wave/wave .
ENTRYPOINT ["/bin/wave"]