-
Notifications
You must be signed in to change notification settings - Fork 46
/
Dockerfile
46 lines (33 loc) · 1.84 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
############# builder
FROM golang:1.21 AS builder
WORKDIR /go/src/github.com/gardener/gardener-extension-provider-vsphere
COPY . .
ARG EFFECTIVE_VERSION
RUN make install EFFECTIVE_VERSION=$EFFECTIVE_VERSION
############# base
FROM gcr.io/distroless/static-debian11:nonroot AS base
############# gardener-extension-provider-vsphere
FROM base AS gardener-extension-provider-vsphere
WORKDIR /
COPY charts /charts
COPY --from=builder /go/bin/provider-vsphere /provider-vsphere
ENTRYPOINT ["/provider-vsphere"]
############# gardener-extension-validator-vsphere
FROM base AS gardener-extension-validator-vsphere
WORKDIR /
COPY --from=builder /go/bin/validator-vsphere /validator-vsphere
ENTRYPOINT ["/validator-vsphere"]
############# gcve-tm-run
FROM europe-docker.pkg.dev/gardener-project/releases/testmachinery/testmachinery-run:stable AS tm-image
FROM europe-docker.pkg.dev/gardener-project/releases/cicd/job-image:latest AS gardener-extension-gcve-tm-run
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl; \
chmod +x ./kubectl && mv ./kubectl /usr/local/bin; \
export release=$(curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \"\,\v | awk '{$1=$1};1'); \
curl -LO https://releases.hashicorp.com/terraform/${release}/terraform_${release}_linux_amd64.zip; \
unzip terraform_${release}_linux_amd64.zip ; \
mv terraform /usr/local/bin/terraform; \
curl -sSL https://sdk.cloud.google.com | bash ; \
wget -qO /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && chmod a+x /usr/bin/yq
ENV PATH $PATH:/root/google-cloud-sdk/bin
COPY --from=builder /go/bin/gcve-setup /gcve-setup
COPY --from=tm-image /testrunner /testrunner