forked from loft-sh/vcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.release
33 lines (22 loc) · 895 Bytes
/
Dockerfile.release
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
ARG KINE_VERSION="v0.13.5"
FROM rancher/kine:${KINE_VERSION} AS kine
# Build the manager binary
FROM alpine:3.20 AS builder
WORKDIR /vcluster-dev
ARG TARGETOS
ARG TARGETARCH
ARG HELM_VERSION="v3.16.2"
# Add curl
RUN apk add --no-cache curl
# Install helm binary
RUN curl -s https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz > helm3.tar.gz && tar -zxvf helm3.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin/helm && rm helm3.tar.gz && rm -R linux-${TARGETARCH}
# we use alpine for easier debugging
FROM alpine:3.20
# install runtime dependencies
RUN apk add --no-cache ca-certificates zstd tzdata
# Set root path as working directory
WORKDIR /
COPY vcluster .
COPY --from=kine /bin/kine /usr/local/bin/kine
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm
ENTRYPOINT ["/vcluster", "start"]