forked from gardener/gardener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (23 loc) · 1.13 KB
/
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
29
30
31
32
33
34
35
############# builder #############
FROM golang:1.12.2 AS builder
WORKDIR /go/src/github.com/gardener/gardener
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install \
-ldflags "-X github.com/gardener/gardener/pkg/version.gitVersion=$(cat VERSION) \
-X github.com/gardener/gardener/pkg/version.gitTreeState=$([ -z git status --porcelain 2>/dev/null ] && echo clean || echo dirty) \
-X github.com/gardener/gardener/pkg/version.gitCommit=$(git rev-parse --verify HEAD) \
-X github.com/gardener/gardener/pkg/version.buildDate=$(date --rfc-3339=seconds | sed 's/ /T/')" \
./...
############# apiserver #############
FROM alpine:3.8 AS apiserver
RUN apk add --update bash curl tzdata
COPY --from=builder /go/bin/gardener-apiserver /gardener-apiserver
WORKDIR /
ENTRYPOINT ["/gardener-apiserver"]
############# controller-manager #############
FROM alpine:3.8 AS controller-manager
RUN apk add --update bash curl openvpn tzdata
COPY --from=builder /go/bin/gardener-controller-manager /gardener-controller-manager
COPY charts /charts
WORKDIR /
ENTRYPOINT ["/gardener-controller-manager"]