Replace binary version of hetzner-driver with build from source
This commit is contained in:
parent
6b539a58bd
commit
946fafe836
1 changed files with 16 additions and 13 deletions
29
Dockerfile
29
Dockerfile
|
@ -1,10 +1,21 @@
|
|||
FROM docker.io/library/golang:1.16.6 as driver-builder
|
||||
|
||||
# renovate: datasource=gitlab-tags depName=git.shivering-isles.com/github-mirror/JonasProgrammer/docker-machine-driver-hetzner
|
||||
ARG HETZNER_VERSION=3.3.0
|
||||
|
||||
ENV GO111MODULE=on
|
||||
|
||||
RUN mkdir -p /go/src/app
|
||||
|
||||
WORKDIR /go/src/app
|
||||
|
||||
RUN git clone --depth 3 --branch "$HETZNER_VERSION" https://git.shivering-isles.com/github-mirror/JonasProgrammer/docker-machine-driver-hetzner.git ./
|
||||
|
||||
RUN go build -o docker-machine-driver-hetzner
|
||||
|
||||
FROM docker.io/gitlab/gitlab-runner:v14.1.0
|
||||
|
||||
LABEL maintainer="Sheogorath <sheogorath@shivering-isles.com>"
|
||||
# renovate: datasource=github-tags depName=JonasProgrammer/docker-machine-driver-hetzner
|
||||
ARG HETZNER_VERSION=3.3.0
|
||||
ARG HETZNER_HASH=103b9643da895b97fa51c91f843d9be4eced345264ff7e6e91f4e7778e0f56c2
|
||||
|
||||
|
||||
RUN true \
|
||||
&& apt-get update \
|
||||
|
@ -13,12 +24,4 @@ RUN true \
|
|||
&& apt-get clean && apt-get purge && rm -r /var/lib/apt/lists/* \
|
||||
&& true
|
||||
|
||||
RUN true \
|
||||
&& wget "https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/${HETZNER_VERSION}/docker-machine-driver-hetzner_${HETZNER_VERSION}_linux_amd64.tar.gz" \
|
||||
&& echo "${HETZNER_HASH} docker-machine-driver-hetzner_${HETZNER_VERSION}_linux_amd64.tar.gz" > check_file \
|
||||
&& sha256sum -c check_file \
|
||||
&& tar -xvf "docker-machine-driver-hetzner_${HETZNER_VERSION}_linux_amd64.tar.gz" \
|
||||
&& rm "docker-machine-driver-hetzner_${HETZNER_VERSION}_linux_amd64.tar.gz" check_file \
|
||||
&& chmod +x docker-machine-driver-hetzner \
|
||||
&& mv docker-machine-driver-hetzner /usr/local/bin/ \
|
||||
&& true
|
||||
COPY --from=driver-builder /go/src/app/docker-machine-driver-hetzner /usr/local/bin/
|
||||
|
|
Reference in a new issue