Switch to apline images for size & fix issues with hetzner driver not starting
This commit is contained in:
parent
9dbdcdcfc5
commit
4b7d11bb74
1 changed files with 4 additions and 9 deletions
13
Dockerfile
13
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/library/golang:1.21.1 as driver-builder
|
FROM docker.io/library/golang:1.21.1-alpine as driver-builder
|
||||||
|
|
||||||
# renovate: datasource=git-tags depName=https://github.com/JonasProgrammer/docker-machine-driver-hetzner.git
|
# renovate: datasource=git-tags depName=https://github.com/JonasProgrammer/docker-machine-driver-hetzner.git
|
||||||
ARG HETZNER_VERSION=5.0.1
|
ARG HETZNER_VERSION=5.0.1
|
||||||
|
@ -9,19 +9,14 @@ RUN mkdir -p /go/src/app
|
||||||
|
|
||||||
WORKDIR /go/src/app
|
WORKDIR /go/src/app
|
||||||
|
|
||||||
|
RUN apk add git
|
||||||
|
|
||||||
RUN git clone --depth 3 --branch "$HETZNER_VERSION" https://github.com/JonasProgrammer/docker-machine-driver-hetzner.git ./
|
RUN git clone --depth 3 --branch "$HETZNER_VERSION" https://github.com/JonasProgrammer/docker-machine-driver-hetzner.git ./
|
||||||
|
|
||||||
RUN go build -o docker-machine-driver-hetzner
|
RUN go build -o docker-machine-driver-hetzner
|
||||||
|
|
||||||
FROM docker.io/gitlab/gitlab-runner:v16.4.0
|
FROM docker.io/gitlab/gitlab-runner:alpine-v16.4.0
|
||||||
|
|
||||||
LABEL maintainer="Sheogorath <sheogorath@shivering-isles.com>"
|
LABEL maintainer="Sheogorath <sheogorath@shivering-isles.com>"
|
||||||
|
|
||||||
RUN true \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get upgrade -y \
|
|
||||||
&& apt-get install -y sudo \
|
|
||||||
&& apt-get clean && apt-get purge && rm -r /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
COPY --from=driver-builder /go/src/app/docker-machine-driver-hetzner /usr/local/bin/
|
COPY --from=driver-builder /go/src/app/docker-machine-driver-hetzner /usr/local/bin/
|
||||||
|
|
Reference in a new issue