Skip to content

Commit

Permalink
Use alpine as builder
Browse files Browse the repository at this point in the history
  • Loading branch information
rwunderer committed Oct 23, 2023
1 parent 122db2c commit e95e3ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ jobs:
- image: minimal
target: hcloud-cli-minimal
platforms: linux/amd64,linux/arm64,linux/arm/v7
#platforms: linux/arm64

- image: debug
target: hcloud-cli-debug
platforms: linux/amd64,linux/arm64,linux/arm/v7
#platforms: linux/arm64

steps:
- name: Checkout repository
Expand Down
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------
# Download hcloud
#-------------------
FROM busybox:v1.36.1@sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79 as builder
FROM alpine:3.8.5@sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14 as builder

# renovate: datasource=github-releases depName=hcloud-cli lookupName=hetznercloud/cli
ARG HCLOUD_VERSION=v1.38.3
Expand All @@ -11,11 +11,14 @@ ARG TARGETVARIANT

WORKDIR /tmp

#RUN wget https://github.com/hetznercloud/cli/releases/download/${HCLOUD_VERSION}/hcloud-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}.tar.gz && \
# tar xzf hcloud-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}.tar.gz hcloud && \
# install hcloud /bin && \
# rm hcloud-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}.tar.gz hcloud
RUN touch /bin/hcloud
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
Expand Down

0 comments on commit e95e3ba

Please sign in to comment.