forked from banzaicloud/istio-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
30 lines (22 loc) · 846 Bytes
/
Dockerfile.dev
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
ARG GO_VERSION=1.13.9
# Build the manager binary
FROM golang:${GO_VERSION}-alpine3.11 AS builder
RUN apk add --update --no-cache ca-certificates make~=4.2 git~=2.24 curl~=7.67 mercurial~=5.3 bash~=5
ARG PACKAGE=github.com/banzaicloud/istio-operator
RUN mkdir -p /go/src/${PACKAGE}
WORKDIR /go/src/${PACKAGE}
COPY go.mod go.sum ./
RUN go mod download
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/
COPY test/e2e/e2e-test.mk /go/src/${PACKAGE}/test/e2e/
COPY Makefile go.* /go/src/${PACKAGE}/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager github.com/banzaicloud/istio-operator/cmd/manager
# Copy the controller-manager into a thin image
FROM alpine:3.11
RUN apk add --no-cache ca-certificates
WORKDIR /
COPY --from=builder /go/src/github.com/banzaicloud/istio-operator/manager .
ENTRYPOINT ["/manager"]