forked from extern/zerotier-docker
enhance build
This commit is contained in:
parent
7c27136ec8
commit
6fe8e729bc
7
.github/workflows/multiarch.yml
vendored
7
.github/workflows/multiarch.yml
vendored
@ -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
|
||||
|
||||
|
11
Dockerfile
11
Dockerfile
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user