forked from gardener/gardener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (41 loc) · 1.7 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
############# builder #############
FROM golang:1.13.6 AS builder
WORKDIR /go/src/github.com/gardener/gardener
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install \
-mod=vendor \
-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 --iso-8601=seconds)" \
./...
############# apiserver #############
FROM alpine:3.11.3 AS apiserver
RUN apk add --update tzdata
COPY --from=builder /go/bin/gardener-apiserver /gardener-apiserver
WORKDIR /
ENTRYPOINT ["/gardener-apiserver"]
############# controller-manager #############
FROM alpine:3.11.3 AS controller-manager
RUN apk add --update tzdata
COPY --from=builder /go/bin/gardener-controller-manager /gardener-controller-manager
COPY charts /charts
WORKDIR /
ENTRYPOINT ["/gardener-controller-manager"]
############# scheduler #############
FROM alpine:3.11.3 AS scheduler
COPY --from=builder /go/bin/gardener-scheduler /gardener-scheduler
WORKDIR /
ENTRYPOINT ["/gardener-scheduler"]
############# gardenlet #############
FROM alpine:3.11.3 AS gardenlet
RUN apk add --update openvpn tzdata
COPY --from=builder /go/bin/gardenlet /gardenlet
COPY charts /charts
WORKDIR /
ENTRYPOINT ["/gardenlet"]
############# registry-migrator #############
FROM alpine:3.11.3 AS registry-migrator
COPY --from=builder /go/bin/registry-migrator /registry-migrator
WORKDIR /
ENTRYPOINT ["/registry-migrator"]