-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (50 loc) · 1.75 KB
/
Copy pathDockerfile
File metadata and controls
73 lines (50 loc) · 1.75 KB
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
67
68
69
70
71
72
73
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
#
# SPDX-License-Identifier: Apache-2.0
############# builder #############
FROM golang:1.26 AS builder
WORKDIR /go/src/github.com/gardener/test-infra
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
COPY . .
RUN make install
############# tm-controller #############
FROM alpine:3.23 AS tm-controller
COPY charts /charts
COPY --from=builder /go/bin/testmachinery-controller /testmachinery-controller
WORKDIR /
ENTRYPOINT ["/testmachinery-controller"]
############# tm-base-step #############
FROM golang:1.26-alpine AS base-step
RUN \
apk add --update --no-cache \
bash \
ca-certificates \
curl \
git \
&& curl https://aia.pki.co.sap.com/aia/SAP%20Global%20Root%20CA.crt -o \
/usr/local/share/ca-certificates/SAP_Global_Root_CA.crt \
&& curl https://aia.pki.co.sap.com/aia/SAPNetCA_G2_2.crt -o \
/usr/local/share/ca-certificates/SAPNetCA_G2_2.crt \
&& update-ca-certificates
############# tm-run #############
FROM base-step AS tm-run
COPY --from=builder /go/bin/testrunner /testrunner
WORKDIR /
ENTRYPOINT ["/testrunner"]
############# tm-bot #############
FROM alpine:3.23 AS tm-bot
RUN apk add --update --no-cache bash curl
COPY ./pkg/tm-bot/ui/static /app/static
COPY ./pkg/tm-bot/ui/templates /app/templates
COPY --from=builder /go/bin/tm-bot /tm-bot
WORKDIR /
ENTRYPOINT ["/tm-bot"]
############# tm-prepare #############
FROM base-step AS tm-prepare
COPY --from=builder /go/bin/prepare /tm/prepare
CMD [ "/tm/prepare" ]