-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (29 loc) · 1.17 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
#-------------------
# Download hcloud
#-------------------
FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d as builder
# renovate: datasource=github-releases depName=hcloud-cli lookupName=hetznercloud/cli
ARG HCLOUD_VERSION=v1.47.0
ARG TARGETARCH
ARG TARGETOS
ARG TARGETVARIANT
WORKDIR /tmp
RUN apk --no-cache add --upgrade \
curl
RUN IMAGE=hcloud-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}.tar.gz && \
curl -SsL -o ${IMAGE} https://github.com/hetznercloud/cli/releases/download/${HCLOUD_VERSION}/${IMAGE} && \
tar xzf ${IMAGE} hcloud && \
install hcloud /bin && \
rm ${IMAGE} hcloud
#-------------------
# Minimal image
#-------------------
FROM gcr.io/distroless/static-debian12:nonroot@sha256:dcd3f1f09adef5689088c9c4d96a8d98c889d8281d3946145074f89eafe7e1af as hcloud-cli-minimal
COPY --from=builder /bin/hcloud /bin/hcloud
ENTRYPOINT ["/bin/hcloud"]
#-------------------
# Debug image
#-------------------
FROM gcr.io/distroless/static-debian12:debug-nonroot@sha256:70bda3be5afc2284279f8a4e497a10a81efec2ae3f23713832aec34845895b3d as hcloud-cli-debug
COPY --from=builder /bin/hcloud /bin/hcloud
ENTRYPOINT ["/bin/hcloud"]