enhance build

This commit is contained in:
Lukas Prettenthaler 2021-08-19 11:31:54 +02:00
parent 7c27136ec8
commit 6fe8e729bc
No known key found for this signature in database
GPG Key ID: 58E5A82932BCE65D
2 changed files with 7 additions and 11 deletions

View File

@ -12,9 +12,6 @@ on:
env:
IMAGE_NAME: zerotier
ALPINE_VERSION: "3.14"
ZT_COMMIT: e8f7d5ef9e7ba6be0b2163cfa31f8817ba5b18f4
ZT_VERSION: "1.6.5"
jobs:
build:
@ -41,9 +38,7 @@ jobs:
tags: ${{ matrix.arch }}
arch: ${{ matrix.arch }}
build-args: |
FROM_IMAGE=${{ format('docker.io/{0}/alpine:{1}', matrix.arch, env.ALPINE_VERSION) }}
ZT_COMMIT=${{ env.ZT_COMMIT }}
ZT_VERSION=${{ env.ZT_VERSION }}
ALPINE_IMAGE=${{ format('docker.io/{0}/alpine', matrix.arch) }}
dockerfiles: |
./Dockerfile

View File

@ -1,8 +1,9 @@
ARG FROM_IMAGE
ARG ZT_COMMIT
ARG ZT_VERSION
ARG ALPINE_IMAGE
ARG ALPINE_VERSION=3.14
ARG ZT_COMMIT=e8f7d5ef9e7ba6be0b2163cfa31f8817ba5b18f4
ARG ZT_VERSION=1.6.5
FROM ${FROM_IMAGE} as builder
FROM ${FROM_IMAGE}:${ALPINE_VERSION} as builder
RUN apk add --update alpine-sdk linux-headers \
&& git clone --quiet https://github.com/zerotier/ZeroTierOne.git /src \
@ -10,7 +11,7 @@ RUN apk add --update alpine-sdk linux-headers \
&& cd /src \
&& make -f make-linux.mk
FROM ${FROM_IMAGE}
FROM ${FROM_IMAGE}:${ALPINE_VERSION}
LABEL version="${ZT_VERSION}"
LABEL description="ZeroTier One as Docker Image"